.rail-index {
  display: none;
}

.site-main {
  display: block;
  padding: 24px 20px 48px;
  background: var(--theme-bg);
  color: var(--theme-fg);
}

.entry-header {
  max-width: 680px;
  margin: 0 0 var(--gap-3);
}

.entry-header.front-header {
  max-width: none;
}

.entry-header:not(.front-header) {
  padding-bottom: 24px;
  border-bottom: 1px dotted var(--theme-accent);
  margin-bottom: 32px;
}

.issue-number {
  margin: 0 0 10px;
  font: 600 17px/1.2 var(--font-text);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  color: var(--theme-accent);
}

.entry-title {
  margin: 0 0 var(--gap-2);
  font: 600 clamp(38px, 1.6rem + 2.2vw, 48px)/1.05 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--theme-fg);
  text-wrap: balance;
}

.entry-summary {
  margin: 0 0 var(--gap-2);
  font-size: 18px;
  line-height: 1.5;
}

.entry-byline {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--theme-fg-muted);
}

.entry-byline span {
  color: var(--theme-fg);
  font-weight: 500;
}

.issue-date {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--theme-fg-muted);
  font-variant-numeric: tabular-nums;
}

.post-thumbnail {
  margin: var(--gap-3) 0 0;
}

.wp-block-image {
  position: relative;
  margin: 0;
}

.wp-block-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 8px 24px var(--theme-shadow);
}

.wp-block-image figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--theme-fg-muted);
}

.fig-no {
  font-weight: 600;
  color: var(--theme-accent);
  font-variant-numeric: tabular-nums;
}

.ad-ribbon {
  position: absolute;
  top: 18px;
  left: -8px;
  z-index: 2;
  padding: 8px 14px 8px 12px;
  background: var(--theme-accent);
  color: var(--theme-accent-fg);
  font: 600 13px/1 var(--font-text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 3px 8px rgba(15, 46, 31, 0.25);
}

.ad-ribbon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  border-top: 8px solid var(--theme-accent-dark);
  border-left: 8px solid transparent;
}

.page-index {
  margin: 0;
}

.site-main .page-index {
  margin: 0 0 var(--gap-4);
  padding: 20px;
  background: var(--theme-bg-alt);
  color: var(--theme-fg);
  border-radius: 16px;
}

.page-index .widget-title {
  margin: 0 0 10px;
  font: 600 22px/1.2 var(--font-display);
  color: var(--theme-fg);
}

.page-index ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: idx;
}

.page-index li {
  counter-increment: idx;
}

.page-index a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 9px 0;
  font-size: 15px;
  line-height: 1.35;
  color: var(--theme-fg);
  text-decoration: none;
}

.site-main .page-index li + li a {
  border-top: 1px dotted rgba(27, 107, 69, 0.45);
}

.page-index a::before {
  content: counter(idx) ".";
  flex: none;
  min-width: 1.5em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--theme-accent);
}

.page-index a:hover {
  color: var(--theme-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.entry-content {
  max-width: 680px;
  counter-reset: sec;
}

.entry-content > :first-child {
  margin-top: 0;
}

.entry-content p {
  margin: 0 0 18px;
}

.entry-content h2 {
  counter-increment: sec;
  margin: var(--gap-4) 0 var(--gap-2);
  padding: 28px 0 0 1.35em;
  border-top: 1px dotted var(--theme-accent);
  font: 600 30px/1.15 var(--font-display);
  letter-spacing: -0.005em;
  color: var(--theme-fg);
  text-wrap: balance;
}

.entry-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.entry-content h2::before {
  content: counter(sec) ".";
  display: inline-block;
  width: 1.35em;
  margin-left: -1.35em;
  color: var(--theme-accent);
  font-variant-numeric: lining-nums tabular-nums;
}

.entry-content h3 {
  margin: 28px 0 8px;
  font: 600 22px/1.2 var(--font-display);
  color: var(--theme-fg);
}

.entry-content a {
  color: var(--theme-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.entry-content a:hover {
  color: var(--theme-accent-dark);
  text-decoration-thickness: 2px;
}

.entry-content ul {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.entry-content ul > li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 1.4em;
}

.entry-content ul > li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--theme-accent);
  font-weight: 600;
}

.entry-content ol {
  margin: 24px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.entry-content ol > li {
  position: relative;
  counter-increment: step;
  margin: 0;
  padding: 0 0 16px 52px;
  min-height: 44px;
}

.entry-content ol > li + li {
  padding-top: 16px;
  border-top: 1px dotted var(--theme-line);
}

.entry-content ol > li:last-child {
  padding-bottom: 0;
}

.entry-content ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 36px;
  font: 600 34px/1 var(--font-display);
  text-align: left;
  color: var(--theme-accent);
  font-variant-numeric: lining-nums tabular-nums;
}

.entry-content ol > li:first-child::before {
  top: -4px;
}

.entry-content dl {
  margin: 24px 0;
  padding: 0;
}

.entry-content dl > div {
  padding: 14px 0;
  border-top: 1px dotted var(--theme-line);
}

.entry-content dl > div:last-child {
  border-bottom: 1px dotted var(--theme-line);
}

.entry-content dt {
  margin: 0 0 2px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--theme-accent);
}

.entry-content dd {
  margin: 0;
}

.entry-content .wp-block-image {
  margin: 32px 0;
}

.entry-content .wp-block-image img {
  margin: 0;
}

.service-box {
  margin: 32px 0;
  padding: 24px 16px;
  background: var(--theme-bg-alt);
  color: var(--theme-fg);
  border-radius: 16px;
}

.service-box .widget-title {
  margin: 0 0 8px;
  font: 600 25px/1.15 var(--font-display);
  color: var(--theme-fg);
}

.service-box p {
  margin: 0 0 12px;
}

.entry-content .service-box ul {
  margin: 0;
}

.entry-content .service-box ul > li {
  margin: 0;
  padding: 10px 0;
  border-top: 1px dotted rgba(27, 107, 69, 0.5);
}

.entry-content .service-box ul > li::before {
  content: none;
}

.service-box li strong {
  display: block;
  font-weight: 600;
  color: var(--theme-accent);
}

.service-box .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
}

.service-box .button-row a {
  flex: 1 1 100%;
}

.entry-content a.wp-block-button__link,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center; min-height: 2.5rem;
  padding: 10px 16px;
  background: var(--theme-accent);
  color: var(--theme-accent-fg);
  font: 500 16px/1.3 var(--font-text);
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
}

.entry-content a.wp-block-button__link:hover,
.wp-block-button__link:hover {
  background: var(--theme-accent-dark);
  color: var(--theme-accent-fg);
  text-decoration: none;
}

.wp-block-button__link span {
  margin-left: 0.5em;
  transition: transform 0.15s ease;
}

.wp-block-button__link:hover span {
  transform: translateX(3px);
}

.link-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.entry-content .link-pair a {
  display: block;
  padding: 7px 0;
  font-weight: 500;
  line-height: 1.4;
}

.entry-content .footer-text {
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px dotted var(--theme-accent);
  font-size: 15px;
  line-height: 1.6;
  color: var(--theme-fg);
}

.widget-related {
  max-width: 680px;
  margin: var(--gap-5) 0 0;
}

.widget-related .widget-title {
  margin: 0 0 4px;
  padding-top: 8px;
  border-top: 1px solid var(--theme-accent);
  font: 600 28px/1.15 var(--font-display);
  color: var(--theme-fg);
}

.widget-related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget-related li {
  padding: 14px 0;
  border-bottom: 1px dotted var(--theme-accent);
}

.widget-related li:last-child {
  border-bottom: 0;
}

.widget-related a {
  display: inline-block;
  font: 600 24px/1.2 var(--font-display);
  color: var(--theme-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.widget-related a:hover {
  color: var(--theme-accent-dark);
  text-decoration-thickness: 2px;
}

.widget-related p {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--theme-fg-muted);
}

.outro-footer {
  padding: 16px 20px 28px;
  background: var(--theme-bg-deep);
  color: var(--theme-fg);
  border-top: 1px solid var(--theme-accent);
}

.footer-inner {
  max-width: 1020px;
}

.bottom-docs ul {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  column-gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bottom-docs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 500 14px/1.3 var(--font-text);
  color: var(--theme-fg);
  text-decoration: underline;
  text-decoration-color: var(--theme-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.bottom-docs a:hover {
  color: var(--theme-accent-dark);
  text-decoration-thickness: 2px;
}

.colophon-card {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dotted var(--theme-accent);
  color: var(--theme-fg);
}

.colophon-card summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font: 600 14px/1.35 var(--font-text);
  cursor: pointer;
  list-style: none;
}

.colophon-card summary::-webkit-details-marker {
  display: none;
}

.colophon-card summary::after {
  content: "+";
  flex: none;
  margin-left: auto;
  font: 600 22px/1 var(--font-display);
  color: var(--theme-accent);
}

.colophon-card details[open] summary::after {
  content: "–";
}

.colophon-card summary:hover {
  color: var(--theme-accent-dark);
}

.colophon-facts {
  margin: 4px 0 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
}

.colophon-facts > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  padding: 6px 0;
  border-top: 1px dotted var(--theme-line);
}

.colophon-facts dt {
  font-weight: 600;
  color: var(--theme-accent-dark);
}

.colophon-facts dt::after {
  content: ":";
}

.colophon-facts dd {
  margin: 0;
}

@media (min-width: 720px) {
  .site-header {
    padding: 20px 32px 0;
  }

  .site-header::after {
    margin-top: 12px;
  }

  .site-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0 32px;
  }

  .site-title {
    font-size: 34px;
  }

  .main-navigation ul {
    justify-content: flex-end;
    margin: 0;
  }

  .site-main {
    padding: 40px 32px 64px;
  }

  .entry-header.front-header {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 40px;
    align-items: start;
    margin-bottom: var(--gap-4);
  }

  .front-header .post-thumbnail {
    margin: 0;
  }

  .site-main .page-index {
    max-width: 680px;
    padding: 24px 28px;
  }

  .page-index ol {
    columns: 2;
    column-gap: 40px;
  }

  .page-index li {
    break-inside: avoid;
  }

  .entry-content dl > div {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    column-gap: 24px;
  }

  .entry-content dt {
    margin: 0;
    padding-top: 2px;
  }

  .service-box .button-row a {
    flex: 0 1 auto;
  }

  .bottom-docs ul {
    flex-direction: row;
  }

  .service-box {
    padding: 28px 32px;
  }

  .entry-content a.wp-block-button__link,
  .wp-block-button__link {
    padding: 10px 32px;
  }

  .outro-footer {
    padding: 20px 32px 32px;
  }
}

@media (min-width: 1140px) {
  .site-wrap {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
  }

  .site-header {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 36px 26px 28px 28px;
    overflow-y: auto;
  }

  .site-header::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    height: auto;
    margin: 0;
    border: 0;
    border-left: 1px solid var(--theme-accent);
    border-right: 1px solid var(--theme-accent);
    width: 3px;
  }

  .site-header-inner {
    display: block;
  }

  .site-title {
    font-size: 36px;
  }

  .site-description {
    margin-top: -4px;
    font-size: 14px;
  }

  .main-navigation {
    margin-top: 20px;
  }

  .main-navigation ul {
    flex-direction: column;
    justify-content: flex-start;
    margin: 0;
  }

  .main-navigation li + li a {
    border-top: 1px dotted var(--theme-line);
  }

  .main-navigation a {
    display: flex;
    width: 100%;
    font-size: 15px;
  }

  .rail-index {
    display: block;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--theme-accent);
  }

  .rail-index:empty {
    display: none;
  }

  .rail-index .widget-title {
    margin: 0 0 6px;
    font: 600 13px/1.2 var(--font-text);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--theme-fg-muted);
  }

  .rail-index .page-index a {
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 4px 0;
    font-size: 13.5px;
    line-height: 1.35;
  }

  .rail-index .page-index a::before {
    align-self: center;
  }

  .rail-index .page-index ol {
    columns: 1;
  }

  .js .site-main .page-index {
    display: none;
  }

  .site-main {
    padding: 52px 56px 72px;
    max-width: 1020px;
  }

  .entry-header.front-header {
    grid-template-columns: minmax(0, 520px) minmax(0, 340px);
    gap: 48px;
  }

  .entry-title {
    font-size: 48px;
  }

  .entry-content h2 {
    font-size: 32px;
  }

  .outro-footer {
    padding: 24px 56px 36px 296px;
  }
}
