/* Yŏm Sŭngik — page-scoped styles */
.yom-page{
  --yom-ink:#1d1915;
  --yom-muted:#6d655b;
  --yom-paper:#f6f1e8;
  --yom-paper-2:#fbf9f4;
  --yom-line:#ddd2c2;
  --yom-gold:#9a7947;
  --yom-gold-dark:#72552f;
  --yom-indigo:#243344;
  --yom-red:#7a3f34;
  color:var(--yom-ink);
  background:#fff;
}
.yom-page *{box-sizing:border-box}
.yom-page a{text-decoration:none}
.yom-page a:hover{text-decoration:underline;text-underline-offset:3px}
.yom-shell{max-width:1320px;margin:0 auto;padding:0 30px}
.yom-kicker{font:600 10px/1.3 Arial,sans-serif;letter-spacing:.17em;text-transform:uppercase;color:var(--yom-gold-dark)}
.yom-hanja{font-family:"Noto Serif CJK KR","Noto Serif CJK SC","Yu Mincho","Songti SC",serif}
.yom-roman{font-style:italic}
.yom-section{padding:88px 0;border-top:1px solid var(--yom-line)}
.yom-section:first-of-type{border-top:0}
/* Give the opening section a little more breathing room below the hero. */
.yom-page > .yom-section#portrait{padding-top:48px!important}
.yom-section-head{max-width:840px;margin:0 0 38px}
.yom-section h2{font-size:40px;line-height:1.1;font-weight:400;margin:16px 0 16px}
.yom-section h3{font-size:23px;line-height:1.25;font-weight:400;margin:0 0 10px}
.yom-section p{font-size:16px;line-height:1.72;margin:0 0 16px}
.yom-muted{color:var(--yom-muted)}
.yom-source{font:11px/1.5 Arial,sans-serif;color:#746a5e}
.yom-source a{text-decoration:underline;text-underline-offset:3px}

/* hero */
.yom-hero{min-height:640px;background:var(--yom-indigo);color:#fff;position:relative;overflow:hidden}
.yom-hero-grid{min-height:640px;display:grid;grid-template-columns:46% 54%}
.yom-hero-copy{padding:84px 46px 72px 0;display:flex;flex-direction:column;justify-content:center;position:relative;z-index:2}
.yom-hero .yom-kicker{color:#dbc69f}
.yom-hero h1{font-size:clamp(44px,4.25vw,62px);line-height:.98;font-weight:400;margin:12px 0 18px;letter-spacing:-.025em;white-space:nowrap}
.yom-hero h1 .yom-hanja{display:block;font-size:.58em;margin-top:12px;color:#e7d9bf;letter-spacing:.05em;white-space:nowrap}
.yom-hero-lead{font-size:20px!important;line-height:1.55!important;max-width:590px;color:#f3eee6}
.yom-hero-note{font:12px/1.55 Arial,sans-serif;color:#d8d0c5;max-width:570px;border-left:2px solid #b99a69;padding-left:14px;margin-top:10px}
.yom-hero-media{position:relative;min-height:640px}
.yom-hero-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:saturate(.62) contrast(1.05) brightness(.73)}
.yom-hero-media:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,var(--yom-indigo) 0%,rgba(36,51,68,.18) 28%,rgba(36,51,68,.05) 100%)}
.yom-hero-caption{position:absolute;right:18px;bottom:18px;z-index:2;max-width:72%;padding:7px 9px;background:rgba(17,20,25,.62);font:10px/1.4 Arial,sans-serif;color:#fff;text-align:right}
.yom-hero-dates{display:flex;gap:6px;flex-wrap:wrap;margin-top:25px}
.yom-hero-dates a{border:1px solid rgba(255,255,255,.28);padding:7px 10px;font:11px Arial,sans-serif;color:#fff}
.yom-hero-dates a:hover{background:rgba(255,255,255,.08);text-decoration:none}

/* overview */
.yom-intro-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:60px;align-items:start}
.yom-profile-card{background:var(--yom-paper);border:1px solid var(--yom-line);padding:28px}
.yom-profile-name{font-size:30px;margin-bottom:3px}
.yom-profile-hanja{font-size:24px;color:var(--yom-gold-dark);margin-bottom:20px}
.yom-profile-facts{display:grid;grid-template-columns:1fr 1fr;gap:18px 24px}
.yom-profile-fact{border-top:1px solid #d7cbbb;padding-top:10px}
.yom-profile-fact b{display:block;font:10px/1.3 Arial,sans-serif;letter-spacing:.09em;text-transform:uppercase;color:var(--yom-muted);margin-bottom:4px}
.yom-profile-fact span{font-size:15px;line-height:1.45}

/* relationship constellation */
.yom-constellation{margin-top:38px;padding:36px 24px;background:var(--yom-paper-2);border:1px solid var(--yom-line);overflow:auto}
.yom-constellation-grid{min-width:730px;display:grid;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(3,86px);gap:16px;align-items:center}
.yom-node{border:1px solid var(--yom-line);background:#fff;padding:12px 14px;text-align:center;font-size:13px;line-height:1.35;position:relative}
.yom-node small{display:block;font:9px/1.3 Arial,sans-serif;color:var(--yom-muted);text-transform:uppercase;letter-spacing:.07em;margin-top:4px}
.yom-node.core{grid-column:3;grid-row:2;background:var(--yom-indigo);color:#fff;border-color:var(--yom-indigo);font-size:18px}
.yom-node.king{grid-column:3;grid-row:1}
.yom-node.yuan{grid-column:5;grid-row:1}
.yom-node.monasteries{grid-column:1;grid-row:2}
.yom-node.scriptorium{grid-column:5;grid-row:2}
.yom-node.ritual{grid-column:3;grid-row:3}
.yom-node.kong{grid-column:1;grid-row:3}
.yom-node:after{content:"";position:absolute;background:#b8aa96}
.yom-node.king:after{width:1px;height:18px;left:50%;bottom:-18px}
.yom-node.yuan:after{width:80px;height:1px;right:100%;top:50%}
.yom-node.monasteries:after{width:80px;height:1px;left:100%;top:50%}
.yom-node.scriptorium:after{width:80px;height:1px;right:100%;top:50%}
.yom-node.ritual:after{width:1px;height:18px;left:50%;top:-18px}
.yom-node.kong:after{width:166px;height:1px;left:100%;top:25%}

/* timeline */
.yom-timeline-tools{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 26px}
.yom-filter{border:1px solid var(--yom-line);background:#fff;padding:8px 12px;font:11px Arial,sans-serif;cursor:pointer}
.yom-filter.active,.yom-filter:hover{border-color:var(--yom-gold);color:var(--yom-gold-dark);background:#fbf7ef}
.yom-timeline{position:relative;margin:10px 0 0;padding-left:116px}
.yom-timeline:before{content:"";position:absolute;left:74px;top:3px;bottom:3px;width:1px;background:#cfc3b3}
.yom-event{position:relative;padding:0 0 34px}
.yom-event:last-child{padding-bottom:0}
.yom-event-year{position:absolute;left:-116px;width:70px;text-align:right;font:700 15px/1 Arial,sans-serif;color:var(--yom-gold-dark);top:4px}
.yom-event:before{content:"";position:absolute;left:-47px;top:5px;width:10px;height:10px;border-radius:50%;background:#fff;border:2px solid var(--yom-gold)}
.yom-event-body{border:1px solid var(--yom-line);padding:18px 20px;background:#fff}
.yom-event-body h3{font-size:19px}
.yom-event-body p{font-size:14px;margin:6px 0 0}
.yom-event-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.yom-tag{font:9px/1 Arial,sans-serif;text-transform:uppercase;letter-spacing:.08em;padding:5px 7px;background:var(--yom-paper);color:var(--yom-muted)}
.yom-event.is-hidden{display:none}

/* split distinction */
.yom-distinction{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:34px 0}
.yom-distinction-card{padding:25px;border:1px solid var(--yom-line);background:#fff}
.yom-distinction-card.royal{border-top:4px solid var(--yom-indigo)}
.yom-distinction-card.personal{border-top:4px solid var(--yom-red)}
.yom-distinction-label{font:700 10px/1.2 Arial,sans-serif;letter-spacing:.1em;text-transform:uppercase;margin-bottom:10px}
.yom-distinction-card ul{margin:12px 0 0;padding-left:18px}
.yom-distinction-card li{font-size:14px;line-height:1.55;margin-bottom:7px}

/* mission infographic */
.yom-mission{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin:36px 0 20px;border:1px solid var(--yom-line)}
.yom-mission-step{padding:25px 18px;min-height:180px;border-right:1px solid var(--yom-line);position:relative;background:#fff}
.yom-mission-step:last-child{border-right:0}
.yom-mission-step:after{content:"→";position:absolute;right:-11px;top:50%;z-index:2;width:22px;height:22px;border-radius:50%;background:var(--yom-paper);display:grid;place-items:center;color:var(--yom-gold-dark)}
.yom-mission-step:last-child:after{display:none}
.yom-mission-step .num{font:700 10px Arial,sans-serif;color:var(--yom-gold-dark);letter-spacing:.12em}
.yom-mission-step h3{font-size:18px;margin:15px 0 4px}
.yom-mission-step .hanja{font-size:15px;color:var(--yom-muted)}
.yom-mission-step p{font-size:12.5px;line-height:1.5;margin-top:14px}

/* media */
.yom-media-grid{display:grid;grid-template-columns:1.08fr .92fr;gap:28px;align-items:stretch;margin:36px 0}
.yom-figure{margin:0;background:#16181b;border:1px solid #2c2f33;position:relative;overflow:hidden}
.yom-figure img{display:block;width:100%;height:100%;min-height:360px;object-fit:cover}
.yom-figure.contain{background:#ebe7df}
.yom-figure.contain img{object-fit:contain;padding:18px}
.yom-figure figcaption{position:absolute;left:0;right:0;bottom:0;padding:10px 12px;background:linear-gradient(transparent,rgba(0,0,0,.78));color:#fff;font:10px/1.45 Arial,sans-serif;padding-top:34px}
.yom-text-panel{padding:30px;background:var(--yom-paper-2);border:1px solid var(--yom-line)}
.yom-text-panel .big-number{font-size:56px;line-height:1;color:var(--yom-gold-dark);margin-bottom:10px}
.yom-text-panel dl{display:grid;grid-template-columns:120px 1fr;gap:10px 18px;margin:22px 0 0}
.yom-text-panel dt{font:10px/1.4 Arial,sans-serif;text-transform:uppercase;letter-spacing:.08em;color:var(--yom-muted)}
.yom-text-panel dd{font-size:14px;line-height:1.45;margin:0}

/* pagoda cutaway */
.yom-cutaway{display:grid;grid-template-columns:.75fr 1.25fr;gap:34px;align-items:center;margin:36px 0}
.yom-pagoda{display:flex;flex-direction:column;align-items:center;min-height:430px;justify-content:flex-end;padding:18px;background:linear-gradient(#f9f6ef,#eee8dc);border:1px solid var(--yom-line)}
.yom-roof{height:18px;background:#77716a;border-radius:2px 2px 5px 5px;margin:3px auto;box-shadow:0 2px 0 #5e5953}
.yom-roof.r1{width:70px}.yom-roof.r2{width:82px}.yom-roof.r3{width:94px}.yom-roof.r4{width:108px}.yom-roof.r5{width:122px}.yom-roof.r6{width:138px}.yom-roof.r7{width:158px}
.yom-body{width:58px;height:31px;background:#aaa39a;border:1px solid #817b74}
.yom-base{width:190px;height:52px;background:#aaa39a;border:1px solid #817b74;margin-top:5px;position:relative}
.yom-relic-slot{position:absolute;width:48px;height:22px;left:50%;top:8px;transform:translateX(-50%);background:var(--yom-indigo);border:2px solid #d1b476;box-shadow:0 0 0 5px rgba(154,121,71,.12)}
.yom-cutaway-flow{display:grid;gap:12px}
.yom-flow-step{display:grid;grid-template-columns:48px 1fr;gap:15px;align-items:start;padding:15px;border:1px solid var(--yom-line);background:#fff}
.yom-flow-index{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:var(--yom-indigo);color:#fff;font:700 12px Arial,sans-serif}
.yom-flow-step h3{font-size:17px;margin:1px 0 4px}
.yom-flow-step p{font-size:13px;margin:0}

/* object triad */
.yom-objects{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:34px 0}
.yom-object{border:1px solid var(--yom-line);background:#fff;display:flex;flex-direction:column}
.yom-object img{width:100%;height:290px;object-fit:cover;background:#eee}
.yom-object.tall img{object-fit:contain;background:#121212}
.yom-object-body{padding:20px;flex:1}
.yom-object-year{font:700 11px Arial,sans-serif;color:var(--yom-gold-dark);letter-spacing:.1em}
.yom-object h3{font-size:20px;margin:7px 0 5px}
.yom-object .hanja{font-size:14px;color:var(--yom-muted)}
.yom-object p{font-size:13.5px;line-height:1.55;margin-top:12px}

/* inscription */
.yom-inscription{margin:34px 0;padding:30px 34px;background:#152131;color:#fff;border-left:5px solid #b99968}
.yom-inscription .hanja{font-size:23px;line-height:1.75;letter-spacing:.04em;color:#efe3cb}
.yom-inscription .translation{font-size:16px;line-height:1.65;margin-top:18px;color:#fff}
.yom-inscription .note{font:10px/1.45 Arial,sans-serif;color:#bbb5ad;margin-top:12px}

/* efficacy infographic */
.yom-practice-flow{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;align-items:stretch;margin:34px 0}
.yom-practice-step{padding:18px 14px;border:1px solid var(--yom-line);background:var(--yom-paper-2);text-align:center;position:relative}
.yom-practice-step:not(:last-child):after{content:"→";position:absolute;right:-13px;top:50%;transform:translateY(-50%);z-index:2;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#fff;border:1px solid var(--yom-line);color:var(--yom-gold-dark)}
.yom-practice-step b{display:block;font-size:15px;font-weight:400;margin-bottom:6px}
.yom-practice-step small{font:10px/1.4 Arial,sans-serif;color:var(--yom-muted)}

/* final */
.yom-legacy{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:32px}
.yom-legacy-card{padding:25px;background:var(--yom-paper);border:1px solid var(--yom-line)}
.yom-legacy-card .mark{font-size:30px;color:var(--yom-gold-dark);margin-bottom:12px}
.yom-legacy-card p{font-size:13.5px}
.yom-sources{background:#f6f2eb}
.yom-sources-grid{display:grid;grid-template-columns:1fr 1fr;gap:36px}
.yom-sources ul{margin:14px 0 0;padding-left:18px}
.yom-sources li{font-size:13px;line-height:1.55;margin-bottom:8px}
.yom-back{display:inline-flex;gap:8px;align-items:center;margin-top:28px;font:11px Arial,sans-serif;text-transform:uppercase;letter-spacing:.08em;color:var(--yom-gold-dark)}

@media(max-width:980px){
  .yom-hero-grid{grid-template-columns:1fr}
  .yom-hero,.yom-hero-grid{min-height:0}
  .yom-hero-copy{padding:58px 0 40px}
  .yom-hero-media{min-height:430px}
  .yom-hero-media:after{background:linear-gradient(180deg,var(--yom-indigo) 0%,rgba(36,51,68,.06) 22%)}
  .yom-intro-grid,.yom-media-grid,.yom-cutaway,.yom-sources-grid{grid-template-columns:1fr}
  .yom-mission{grid-template-columns:1fr 1fr}
  .yom-mission-step:nth-child(2){border-right:0}
  .yom-mission-step:nth-child(2):after{display:none}
  .yom-objects{grid-template-columns:1fr 1fr}
  .yom-practice-flow{grid-template-columns:1fr}
  .yom-practice-step:not(:last-child):after{content:"↓";right:auto;left:50%;top:auto;bottom:-18px;transform:translateX(-50%)}
}
@media(max-width:680px){
  .yom-shell{padding:0 18px}
  .yom-section{padding:58px 0}
  .yom-section h2{font-size:32px}
  .yom-hero h1{font-size:44px}
  .yom-hero-lead{font-size:17px!important}
  .yom-hero-media{min-height:330px}
  .yom-hero-caption{max-width:92%;font-size:9px}
  .yom-profile-facts{grid-template-columns:1fr}
  .yom-distinction,.yom-objects,.yom-legacy{grid-template-columns:1fr}
  .yom-mission{grid-template-columns:1fr}
  .yom-mission-step{border-right:0;border-bottom:1px solid var(--yom-line)}
  .yom-mission-step:after{content:"↓";right:auto;left:50%;top:auto;bottom:-11px;transform:translateX(-50%)}
  .yom-mission-step:last-child{border-bottom:0}
  .yom-timeline{padding-left:86px}
  .yom-timeline:before{left:52px}
  .yom-event-year{left:-86px;width:42px;font-size:12px}
  .yom-event:before{left:-39px}
  .yom-figure img{min-height:280px}
  .yom-text-panel{padding:22px}
  .yom-text-panel dl{grid-template-columns:1fr;gap:4px}
  .yom-text-panel dd{margin-bottom:9px}
  .yom-inscription{padding:24px 20px}
  .yom-inscription .hanja{font-size:18px}
}


/* inserted research maps */
.yom-map-insert{
  max-width:960px;
  margin:36px auto 44px;
}
.yom-map-insert img{
  display:block;
  width:100%;
  height:auto;
  border:1px solid var(--yom-line);
  background:var(--yom-paper);
  box-shadow:0 10px 28px rgba(50,40,28,.08);
}
.yom-map-insert figcaption{
  padding:12px 3px 0;
  font:11px/1.55 Arial,sans-serif;
  color:var(--yom-muted);
}
.yom-map-insert figcaption strong{
  color:var(--yom-ink);
  font-weight:600;
}
.yom-map-chunked:not(.is-loaded){
  min-height:360px;
  background:linear-gradient(100deg,var(--yom-paper) 30%,var(--yom-paper-2) 50%,var(--yom-paper) 70%);
}
.yom-map-insert.has-error .yom-map-chunked{
  min-height:120px;
}
@media(max-width:680px){
  .yom-map-insert{margin:25px auto 32px}
  .yom-map-chunked:not(.is-loaded){min-height:220px}
}


/* Compact display for the supplied replacement map */
.yom-map-insert--compact{
  max-width:880px;
}
@media(max-width:920px){
  .yom-map-insert--compact{
    max-width:100%;
  }
}


/* Selective one-third reduction for the five requested research images. */
.yom-image-reduced{
  width:66.6667%;
  max-width:66.6667%;
  margin-left:auto!important;
  margin-right:auto!important;
}
.yom-image-reduced img{
  min-height:0!important;
  height:auto!important;
}


/* French Yŏm Sŭngik infographics: reduced by one third and spaced from adjacent text. */
.yom-infographie-reduced{
  width:66.6667%;
  max-width:66.6667%;
  margin:52px auto!important;
}
.yom-infographie-reduced img{
  display:block;
  width:100%;
  height:auto!important;
  min-height:0!important;
  object-fit:contain;
}
@media(max-width:920px){
  .yom-infographie-reduced{
    width:100%;
    max-width:100%;
    margin:36px auto!important;
  }
}


/* Namgyewŏn Lotus Sutra image analysis */
.yom-lotus-analysis{
  max-width:920px;
  margin:44px auto 38px;
  padding-top:30px;
  border-top:1px solid var(--yom-line);
}
.yom-lotus-frontispiece{
  margin:0 0 28px;
  padding:14px;
  background:#e8e3d9;
  border:1px solid var(--yom-line);
}
.yom-lotus-frontispiece img{
  display:block;
  width:100%;
  height:auto;
  background:#d8d2c7;
}
.yom-lotus-frontispiece figcaption{
  margin-top:10px;
  font:10px/1.5 Arial,sans-serif;
  color:var(--yom-muted);
}
.yom-lotus-analysis-copy{
  max-width:820px;
  margin:0 auto;
}
.yom-lotus-analysis-copy h3{
  margin:7px 0 18px;
  font-size:27px;
  line-height:1.2;
}
.yom-lotus-analysis-copy p{
  font-size:14.5px;
  line-height:1.72;
  margin:0 0 15px;
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
}
.yom-lotus-analysis-copy .yom-source{
  margin-top:20px;
}
@media(max-width:680px){
  .yom-lotus-analysis{
    margin:32px auto 28px;
    padding-top:24px;
  }
  .yom-lotus-frontispiece{
    padding:8px;
    margin-bottom:22px;
  }
  .yom-lotus-analysis-copy h3{
    font-size:23px;
  }
}
