/* ============================================================
   Scholars Direct - Publishing Guide
   Palette grounded in the subject: gilt lettering on a navy
   cloth book binding. Deep navy chrome, gold rules, teal links.
   System fonts only: a render-blocking webfont is the cheapest
   LCP regression there is, and Core Web Vitals are part of the job.
   ============================================================ */

:root {
  /* chrome */
  --navy-900: #0e1b2a;
  --navy-800: #16293d;
  --navy-700: #204059;
  --navy-600: #2d5877;

  /* accents */
  --gold:     #c9a227;
  --gold-dim: #9c7d1c;
  --teal:     #14707a;
  --teal-dk:  #0d525a;
  --flag:     #b3261e;   /* used once, for the royalty cliff */
  --flag-bg:  #fdf3f2;

  /* surfaces */
  --paper:    #ffffff;
  --surface:  #f3f6f9;
  --surface-2:#e9eff4;
  --rule:     #d7e0e8;
  --rule-soft:#eaeff4;

  /* text */
  --ink:      #14202b;
  --ink-soft: #48586a;
  --ink-faint:#75849550;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --shell: 1240px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 2rem;
}
@media (max-width: 700px) { .shell { padding-inline: 1.15rem; } }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--teal-dk); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 99;
  background: var(--navy-900); color: #fff;
  padding: .65rem 1rem; font-family: var(--sans); font-size: .9rem;
}

/* ============================ HEADER ============================ */
.site-header {
  background: var(--navy-900);
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  flex: 0 0 38px;
  background: var(--gold);
  color: var(--navy-900);
  font-family: var(--sans);
  font-weight: 800;
  font-size: .8125rem;
  letter-spacing: .04em;
  border-radius: var(--radius);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
}
.brand__text em {
  font-family: var(--sans);
  font-style: normal;
  font-size: .6875rem;
  letter-spacing: .04em;
  color: #8fa4b8;
}

.site-nav ul {
  display: flex; align-items: center; gap: .25rem;
  list-style: none; margin: 0; padding: 0;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: block;
  padding: .5rem .7rem;
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 600;
  color: #c3d2e0;
  text-decoration: none;
  border-radius: var(--radius);
  white-space: nowrap;
}
.site-nav a:hover { background: var(--navy-700); color: #fff; }
.site-nav a.is-active { color: var(--navy-900); background: var(--gold); }

.navtoggle, .navburger { display: none; }

@media (max-width: 940px) {
  .site-header__inner { flex-wrap: wrap; min-height: 64px; }
  .navburger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 9px;
    cursor: pointer; border-radius: var(--radius); border: 1px solid var(--navy-700);
  }
  .navburger span { display: block; height: 2px; background: #c3d2e0; border-radius: 2px; }
  .site-nav {
    flex-basis: 100%;
    max-height: 0; overflow: hidden;
    transition: max-height .22s ease;
  }
  .navtoggle:checked ~ .site-nav { max-height: 560px; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding-bottom: .9rem; }
  .site-nav a { padding: .7rem .75rem; font-size: .9375rem; }
}

/* ============================ HERO ============================ */
.hero {
  background:
    radial-gradient(1100px 380px at 12% -30%, var(--navy-700) 0%, transparent 62%),
    linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  color: #fff;
  padding-block: 2.25rem 3rem;
  border-bottom: 1px solid var(--navy-700);
}

.crumbs ol {
  list-style: none; margin: 0 0 1.75rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: .4rem;
  font-family: var(--sans); font-size: .78125rem;
}
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; color: #62809b; margin-right: .4rem; }
.crumbs a { color: #9db2c6; text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current] { color: #cfdae4; }

.hero .eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 .9rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--gold);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.14;
  letter-spacing: -.018em;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
  max-width: 22ch;
  text-wrap: balance;
}

.hero .standfirst {
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  line-height: 1.55;
  color: #b9c9d8;
  margin: 0 0 1.6rem;
  max-width: 62ch;
  text-wrap: pretty;
}

.byline {
  font-family: var(--sans);
  font-size: .8125rem;
  color: #8fa4b8;
  padding-top: 1.25rem;
  border-top: 1px solid var(--navy-700);
}
.byline a { color: #cfdae4; }
.byline a:hover { color: var(--gold); }
.byline__dot { margin-inline: .5rem; color: var(--navy-600); }

/* ============================ LAYOUT ============================ */
/* Mobile-first. The stacked case is the DEFAULT, so it can never look broken:
   the article stays centred with a proper reading measure instead of hugging
   the left edge and leaving a dead gutter on the right.
   The sidebar only appears when there is genuinely room for it. Note this keys
   off CSS pixels, so a reader at 150% browser zoom correctly gets the stacked
   layout - and it still looks deliberate. */
.layout {
  display: block;
  padding-block: 2.25rem 3rem;
}
.doc { max-width: 46rem; margin-inline: auto; min-width: 0; }

.rail { margin-bottom: 2.5rem; }

@media (min-width: 62rem) {           /* ~992px, before browser zoom */
  .layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
    padding-block: 3rem 4rem;
  }
  .doc  { margin-inline: 0; }
  .rail { position: sticky; top: 96px; margin-bottom: 0; }
}

.rail__label {
  font-family: var(--sans);
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 .85rem;
  padding-bottom: .55rem;
  border-bottom: 2px solid var(--gold);
}

.toc ol { list-style: none; margin: 0 0 2.25rem; padding: 0; counter-reset: toc; }
@media (min-width: 40rem) and (max-width: 62rem) {
  .toc ol { columns: 2; column-gap: 2rem; }
  .toc li { break-inside: avoid; }
}
.toc li { counter-increment: toc; margin: 0; }
.toc a {
  display: flex; gap: .6rem;
  padding: .32rem 0;
  font-family: var(--sans);
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: .7rem;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: #a9b6c3;
  font-size: .6875rem;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
  padding-top: .1rem;
}
.toc a:hover { color: var(--teal); border-left-color: var(--gold); background: var(--surface); }

.rail-nav ul { list-style: none; margin: 0; padding: 0; }
.rail-nav li { margin: 0; }
.rail-nav a {
  display: block;
  padding: .45rem .75rem;
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 2px solid var(--rule);
}
.rail-nav a:hover { color: var(--teal); border-left-color: var(--teal); background: var(--surface); }
.rail-nav a.is-active {
  color: var(--navy-900);
  border-left-color: var(--gold);
  background: var(--surface);
}

/* ---------- article ---------- */
.answer {
  background: linear-gradient(180deg, var(--surface) 0%, var(--paper) 100%);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 0 0 2.5rem;
}
.answer__label {
  font-family: var(--sans);
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 .5rem;
}
.answer__body { margin: 0; font-size: 1.0625rem; line-height: 1.62; }

h2 {
  font-size: clamp(1.5rem, 3vw, 1.9375rem);
  line-height: 1.22;
  letter-spacing: -.012em;
  font-weight: 700;
  color: var(--navy-900);
  margin: 3.25rem 0 1.1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 96px;
  text-wrap: balance;
}
h2::before {
  content: "";
  display: block;
  width: 38px; height: 3px;
  background: var(--gold);
  margin-bottom: 1.1rem;
}

h3 {
  font-size: 1.3125rem;
  line-height: 1.34;
  font-weight: 700;
  color: var(--navy-800);
  margin: 2.1rem 0 .75rem;
  scroll-margin-top: 96px;
}

h4 {
  font-family: var(--sans);
  font-size: .9375rem;
  font-weight: 700;
  margin: 1.75rem 0 .5rem;
  color: var(--navy-800);
}

p { margin: 0 0 1.3rem; }
ul, ol { margin: 0 0 1.5rem; padding-left: 1.4rem; }
li { margin-bottom: .6rem; }
li::marker { color: var(--teal); }
li > ul, li > ol { margin-top: .6rem; margin-bottom: .6rem; }

code {
  font-family: var(--mono);
  font-size: .875em;
  background: var(--surface-2);
  padding: .12em .4em;
  border-radius: 3px;
  color: var(--navy-800);
}

/* ---------- tables ---------- */
.tablewrap {
  margin: 1.9rem 0 2.2rem;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
}
table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .875rem; line-height: 1.5; }
caption {
  caption-side: top; text-align: left;
  font-family: var(--sans); font-size: .75rem; font-weight: 600;
  letter-spacing: .03em;
  color: var(--ink-soft);
  padding: .9rem 1.1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
th, td { text-align: left; padding: .78rem 1.1rem; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
thead th {
  font-size: .6875rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--navy-800);
  border-bottom: 2px solid var(--gold);
  white-space: nowrap;
}
tbody th { font-weight: 700; color: var(--navy-800); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fafcfd; }
tbody tr:hover { background: var(--surface); }
td.num, th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- the signature element: the royalty cliff ---------- */
.cliff {
  margin: 2.5rem 0;
  border: 1px solid var(--flag);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--flag-bg);
}
.cliff__head { padding: 1.2rem 1.5rem 1rem; border-bottom: 1px solid var(--flag); }
.cliff__label {
  font-family: var(--sans); font-size: .6875rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--flag); margin: 0 0 .4rem;
}
.cliff__head p { margin: 0; font-size: 1.0625rem; line-height: 1.5; }
.cliff__grid { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); }
.cliff__cell { padding: 1.6rem 1.25rem; text-align: center; }
.cliff__cell + .cliff__cell { border-left: 1px solid var(--flag); }
.cliff__price {
  font-family: var(--sans); font-size: 2rem; font-weight: 800;
  font-variant-numeric: tabular-nums; letter-spacing: -.025em; margin: 0;
}
.cliff__rate {
  font-family: var(--sans); font-size: .8125rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; margin: .35rem 0 .6rem;
}
.cliff__cell--lose .cliff__price, .cliff__cell--lose .cliff__rate { color: var(--flag); }
.cliff__cell--keep .cliff__price, .cliff__cell--keep .cliff__rate { color: var(--teal); }
.cliff__note { font-family: var(--sans); font-size: .8125rem; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.cliff__foot {
  padding: 1rem 1.5rem; border-top: 1px solid var(--flag);
  font-family: var(--sans); font-size: .8125rem; color: var(--ink-soft); background: var(--flag-bg);
}
.cliff__foot p { margin: 0; }
@media (max-width: 30rem) {
  .cliff__grid { grid-template-columns: 1fr; }
  .cliff__cell + .cliff__cell { border-left: 0; border-top: 1px solid var(--flag); }
}

/* ---------- worked example ---------- */
.calc {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--navy-700);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 1.9rem 0;
  font-family: var(--sans);
  font-size: .9375rem;
}
.calc h4 { margin-top: 0; }
.calc__row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}
.calc__row:last-of-type { border-bottom: 0; }
.calc__row--total {
  border-top: 2px solid var(--navy-800); border-bottom: 0;
  margin-top: .4rem; padding-top: .65rem;
  font-weight: 700; color: var(--navy-900);
}
.calc__label { color: var(--ink-soft); }
.calc__row--total .calc__label { color: var(--navy-900); }
.calc__val { white-space: nowrap; }

/* ---------- callout ---------- */
.note {
  background: #fbfaf3;
  border: 1px solid #e6dcae;
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.15rem 1.4rem;
  margin: 1.9rem 0;
  color: var(--ink-soft);
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--navy-900); }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 1.9rem 0; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding-left: 3.4rem; margin-bottom: 1.9rem; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  background: var(--navy-800); color: var(--gold);
  font-family: var(--sans); font-size: .875rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
  border-radius: var(--radius);
}
.steps h3 { margin-top: .1rem; }

/* ---------- FAQ ---------- */
.faq { margin-top: 1.6rem; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 1.1rem 2.5rem 1.1rem 0;
  font-weight: 700; font-size: 1.0625rem; color: var(--navy-900);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: .5rem; top: 50%;
  transform: translateY(-50%);
  display: grid; place-items: center;
  width: 1.5rem; height: 1.5rem;
  background: var(--surface-2); color: var(--teal);
  font-family: var(--sans); font-size: 1rem; font-weight: 700;
  border-radius: 3px;
}
.faq details[open] summary::after { content: "\2013"; background: var(--gold); color: var(--navy-900); }
.faq summary:hover { color: var(--teal); }
.faq summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.faq__a { padding: 0 0 1.25rem; color: var(--ink-soft); }
.faq__a p:last-child { margin-bottom: 0; }

/* ---------- sources ---------- */
.sources {
  margin-top: 3.5rem;
  padding: 1.75rem 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.sources h2 {
  border-top: 0; padding-top: 0; margin: 0 0 .85rem;
  font-family: var(--sans); font-size: 1.0625rem; letter-spacing: .01em;
}
.sources h2::before { display: none; }
.sources__note { font-family: var(--sans); font-size: .8125rem; line-height: 1.6; color: var(--ink-soft); }
.sources ul { list-style: none; padding: 0; margin: 0; font-family: var(--sans); font-size: .8125rem; }
.sources li { margin-bottom: .4rem; padding-left: 1.1rem; text-indent: -1.1rem; }
.sources li::before { content: "\2192"; color: var(--gold); font-weight: 700; margin-right: .45rem; }

/* ---------- back to pillar ---------- */
.backlink {
  margin-top: 2.5rem;
  padding: 1.15rem 1.4rem;
  background: var(--navy-900);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
  color: #b9c9d8;
  font-size: 1rem;
}
.backlink p { margin: 0; }
.backlink a { color: #fff; font-weight: 700; }
.backlink a:hover { color: var(--gold); }

/* ---------- silo cards ---------- */
.silo { background: var(--surface); border-top: 1px solid var(--rule); padding-block: 3.5rem; }
.silo__title {
  margin: 0 0 1.75rem;
  font-family: var(--sans);
  font-size: .6875rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.silo__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.15rem; }
@media (min-width: 640px)  { .silo__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .silo__grid { grid-template-columns: repeat(3, 1fr); } }
.silo__grid li { margin: 0; }
.silo__grid a {
  display: flex; flex-direction: column; height: 100%;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--navy-700);
  border-radius: var(--radius);
  padding: 1.3rem 1.35rem;
  text-decoration: none;
  transition: border-top-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.silo__grid a:hover {
  border-top-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px -12px rgba(14, 27, 42, .32);
}
.silo__card-title {
  display: block; color: var(--navy-900);
  font-weight: 700; font-size: 1.0625rem; line-height: 1.32;
  margin-bottom: .45rem;
}
.silo__card-teaser {
  display: block; flex: 1;
  font-family: var(--sans); font-size: .8125rem; line-height: 1.55;
  color: var(--ink-soft); margin-bottom: .9rem;
}
.silo__card-go {
  font-family: var(--sans); font-size: .75rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--teal);
}
.silo__grid a:hover .silo__card-go { color: var(--gold-dim); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy-900);
  border-top: 3px solid var(--gold);
  color: #8fa4b8;
  font-family: var(--sans);
  font-size: .875rem;
  padding-block: 3rem 2rem;
}
.site-footer__cols {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--navy-700);
}
@media (min-width: 760px) { .site-footer__cols { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; } }

.brand--light .brand__text strong { color: #fff; }
.site-footer__blurb { margin: 1rem 0 0; max-width: 42ch; line-height: 1.65; font-size: .8125rem; }

.site-footer__col h3 {
  margin: 0 0 .9rem;
  font-size: .6875rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold);
}
.site-footer__col ul { list-style: none; margin: 0; padding: 0; }
.site-footer__col li { margin-bottom: .5rem; }
.site-footer__col a { color: #b9c9d8; text-decoration: none; }
.site-footer__col a:hover { color: var(--gold); text-decoration: underline; }

.site-footer__base {
  padding-top: 1.5rem;
  font-size: .75rem;
  line-height: 1.6;
  color: #6f8296;
}
.site-footer__base p { margin: 0 0 .4rem; max-width: 80ch; }

/* ---------- a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
