:root {
  --bg-main: #1f2433;
  --bg-deep: #171b27;
  --bg-panel: #f2e6ce;
  --bg-panel-2: #e6d7ba;
  --bg-panel-3: #d7c4a0;
  --bg-sidebar: rgba(26, 21, 32, 0.88);
  --bg-glass: rgba(255, 248, 231, 0.08);
  --bg-marquee: linear-gradient(90deg, #6d2037 0%, #8f6b2a 50%, #384f73 100%);
  --bg-button: linear-gradient(180deg, #f6ead3 0%, #ddc49a 100%);
  --bg-button-dark: linear-gradient(180deg, #2e354c 0%, #202636 100%);
  --bg-hero: radial-gradient(circle at top, rgba(240, 215, 157, 0.14), transparent 40%),
    linear-gradient(180deg, rgba(28, 20, 33, 0.75), rgba(28, 20, 33, 0.92));
  --text-main: #221d1a;
  --text-soft: #4b4035;
  --text-inverse: #f7efd9;
  --text-gold: #e4c777;
  --text-link: #4f2946;
  --text-link-hover: #8a2849;
  --border-dark: #2c1f1b;
  --border-mid: #7f6340;
  --border-light: #d7c5a7;
  --border-gold: #b79249;
  --shadow-deep: 0 18px 40px rgba(0, 0, 0, 0.4);
  --shadow-panel: 0 10px 22px rgba(30, 17, 11, 0.24);
  --shadow-inset: inset 0 1px 0 rgba(255, 250, 240, 0.75);
  --radius-soft: 8px;
  --radius-hard: 2px;
  --site-width: 1100px;
  --content-width: 660px;
  --sidebar-width: 240px;
  --left-rail-width: 180px;
  --gap-main: 18px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --font-body: Georgia, "Times New Roman", serif;
  --font-heading: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-meta: "Trebuchet MS", Verdana, Arial, sans-serif;
  --font-mono: "Courier New", Courier, monospace;
  --line-body: 1.65;
  --tile-size: 240px;
  --frame-edge: 10px;
  --scanline: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    rgba(0, 0, 0, 0.025) 2px,
    rgba(0, 0, 0, 0.025) 3px
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: #171b27;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: var(--line-body);
  background:
    url("../images/patterns/bart-crest.webp") repeat,
    #e2d4b6;
  background-size: 350px auto, auto;
  background-position: center top, center;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: var(--scanline);
  opacity: 0.3;
  mix-blend-mode: soft-light;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 230, 164, 0.06), transparent 24%),
    radial-gradient(circle at 85% 12%, rgba(126, 50, 79, 0.08), transparent 20%),
    radial-gradient(circle at 78% 78%, rgba(55, 87, 125, 0.11), transparent 24%);
  z-index: 0;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

iframe {
  max-width: 100%;
  border: 0;
}

a {
  color: var(--text-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

a:hover,
a:focus-visible {
  color: var(--text-link-hover);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

hr {
  border: 0;
  height: 1px;
  margin: var(--space-5) 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(115, 89, 52, 0.4) 20%,
    rgba(115, 89, 52, 0.75) 50%,
    rgba(115, 89, 52, 0.4) 80%,
    transparent 100%
  );
}

::selection {
  color: #16120f;
  background: #f0d79c;
}

:focus-visible {
  outline: 2px dashed var(--border-gold);
  outline-offset: 3px;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), var(--site-width));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.site-frame {
  position: relative;
  border: 3px solid var(--border-dark);

  background:
    linear-gradient(180deg, rgba(245, 233, 206, 0.94), rgba(227, 211, 180, 0.96));

  box-shadow: var(--shadow-deep);
  overflow: clip;
}

.site-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
 /* background: url("../images/patterns/bart-crest.webp") repeat;*/
  background-size: 420px 420px;
  background-position: center;
  opacity: 0.08;
  mix-blend-mode: multiply;
},
.site-frame::after {
  content: "";
  position: absolute;
  inset: var(--frame-edge);
  pointer-events: none;
  border: 1px solid rgba(136, 101, 52, 0.45);
}

.site-frame::after {
  inset: calc(var(--frame-edge) + 6px);
  border-color: rgba(255, 245, 215, 0.25);
}

.site-topline {
  padding: 0.45rem 1rem;
  color: var(--text-inverse);
  font-family: var(--font-meta);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background:
    linear-gradient(90deg, #1f2433 0%, #4a2743 32%, #8c6a31 65%, #26344a 100%);
  border-bottom: 2px solid #120f16;
}

.site-grid {
  display: grid;
  grid-template-columns: var(--left-rail-width) minmax(0, 1fr) var(--sidebar-width);
  gap: var(--gap-main);
  align-items: start;
  padding: 1rem;
}

.left-rail,
.right-rail,
.main-column {
  min-width: 0;
}

.left-rail,
.right-rail {
  display: grid;
  gap: 1rem;
}

.main-column {
  display: grid;
  gap: 1rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--border-dark);
  background:
    var(--bg-hero),
    url("../images/banners/home-banner.jpg") center / cover no-repeat;
  color: var(--text-inverse);
  box-shadow: var(--shadow-panel);
}

.hero-panel--plain {
  background:
    var(--bg-hero),
    linear-gradient(135deg, #26344a 0%, #412739 52%, #6e572e 100%);
}

.hero-panel__inner {
  display: grid;
  gap: 1rem;
  min-height: 280px;
  padding: 1.5rem;
  align-content: end;
}

.hero-panel__kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(248, 225, 172, 0.45);
  background: rgba(26, 19, 31, 0.55);
  color: #f9e8b9;
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-panel__title {
  margin: 0;
  max-width: 12ch;
  color: #fff8e8;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 0.98;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.hero-panel__subtitle {
  max-width: 56ch;
  margin: 0;
  color: #f4e8d0;
  font-size: 1.05rem;
}

.hero-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-panel__meta-item {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(255, 238, 196, 0.3);
  background: rgba(17, 14, 19, 0.42);
  font-family: var(--font-meta);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.panel,
.sidebar-box,
.content-box,
.widget-box,
.archive-box,
.quote-box,
.profile-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(246, 235, 213, 0.98), rgba(228, 212, 181, 0.98)),
    url("../images/textures/paper-grain.webp");
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-panel);
}

.panel::before,
.sidebar-box::before,
.content-box::before,
.widget-box::before,
.archive-box::before,
.quote-box::before,
.profile-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(129, 96, 52, 0.38);
  pointer-events: none;
}

.panel > *:first-child,
.sidebar-box > *:first-child,
.content-box > *:first-child,
.widget-box > *:first-child,
.archive-box > *:first-child,
.quote-box > *:first-child,
.profile-card > *:first-child {
  margin-top: 0;
}

.panel > *:last-child,
.sidebar-box > *:last-child,
.content-box > *:last-child,
.widget-box > *:last-child,
.archive-box > *:last-child,
.quote-box > *:last-child,
.profile-card > *:last-child {
  margin-bottom: 0;
}

.panel__inner,
.sidebar-box__inner,
.content-box__inner,
.widget-box__inner,
.archive-box__inner,
.quote-box__inner,
.profile-card__inner {
  position: relative;
  padding: 1rem;
}

.panel__heading,
.section-title,
.sidebar-title,
.widget-title,
.archive-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  color: #281d17;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.1;
}

.section-title small,
.sidebar-title small,
.widget-title small {
  color: #755f49;
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker,
.mini-label,
.meta-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border-mid);
  background: rgba(255, 248, 232, 0.65);
  color: #5f4631;
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: var(--shadow-inset);
}

.site-header {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 2px solid rgba(44, 31, 27, 0.4);
  background:
    linear-gradient(180deg, rgba(29, 34, 48, 0.9), rgba(29, 34, 48, 0.7)),
    url("../images/textures/pinstripe-fade.webp");
  color: var(--text-inverse);
}

.site-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
}

.site-brand__crest {
  width: 60px;
  height: 60px;
  padding: 0.5rem;
  border: 1px solid rgba(240, 212, 148, 0.45);
  background: rgba(255, 247, 227, 0.08);
}

.site-brand__crest svg {
  width: 100%;
  height: 100%;
  fill: #f1d28f;
}

.site-brand__title-wrap {
  min-width: 0;
}

.site-brand__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.5vw, 2.35rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  color: #fff7e7;
}

.site-brand__subtitle {
  margin: 0.25rem 0 0;
  color: rgba(249, 237, 208, 0.9);
  font-size: 0.98rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.site-nav a,
.button-link,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--border-dark);
  background: var(--bg-button);
  color: #241b16;
  font-family: var(--font-meta);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 251, 240, 0.8),
    0 3px 0 rgba(68, 47, 31, 0.8);
  transform: translateY(0);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    color 180ms ease,
    filter 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.button-link:hover,
.button-link:focus-visible,
.mini-button:hover,
.mini-button:focus-visible {
  color: #5c1f35;
  box-shadow:
    inset 0 1px 0 rgba(255, 251, 240, 0.9),
    0 1px 0 rgba(68, 47, 31, 0.8);
  transform: translateY(2px);
}

.button-link--dark,
.mini-button--dark {
  background: var(--bg-button-dark);
  color: var(--text-inverse);
  border-color: #0d0f15;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 3px 0 rgba(8, 9, 12, 0.95);
}

.button-link--dark:hover,
.button-link--dark:focus-visible,
.mini-button--dark:hover,
.mini-button--dark:focus-visible {
  color: #f6dd9c;
}

.page-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3vw, 2.85rem);
  line-height: 1;
  color: #241b17;
}

.page-intro {
  margin: 0;
  max-width: 62ch;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.columns-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.columns-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.feature-grid > .feature-main {
  grid-column: span 8;
}

.feature-grid > .feature-side {
  grid-column: span 4;
}

.profile-slab {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.profile-slab__photo {
  position: relative;
  padding: 0.65rem;
  border: 2px solid var(--border-dark);
  background:
    linear-gradient(180deg, #fff6e4 0%, #ddc7a4 100%);
  box-shadow: var(--shadow-panel);
}

.profile-slab__photo::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(132, 98, 51, 0.4);
  pointer-events: none;
}

.profile-slab__photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(63, 44, 27, 0.8);
}

.profile-slab__content {
  display: grid;
  gap: 0.9rem;
}

.profile-nameplate {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border-dark);
  background:
    linear-gradient(180deg, rgba(39, 48, 70, 0.96), rgba(26, 29, 40, 0.96));
  color: var(--text-inverse);
}

.profile-nameplate__name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 2.4vw, 2.35rem);
  line-height: 1;
  color: #fff5dd;
}

.profile-nameplate__title {
  margin: 0;
  color: #e9d5ab;
  font-family: var(--font-meta);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.badge-row,
.icon-row,
.button-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.identity-badge,
.status-badge,
.small-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border-mid);
  background:
    linear-gradient(180deg, rgba(255, 249, 236, 0.94), rgba(231, 213, 176, 0.94));
  color: #33251c;
  font-family: var(--font-meta);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: var(--shadow-inset);
}

.identity-badge svg,
.status-badge svg,
.small-badge svg {
  width: 18px;
  height: 18px;
  fill: #6a2e46;
  flex: 0 0 auto;
}

.notice-strip,
.marquee-box,
.status-strip {
  position: relative;
  overflow: hidden;
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--border-dark);
  color: #fff1cb;
  background: var(--bg-marquee);
  box-shadow: var(--shadow-panel);
}

.notice-strip__text,
.marquee-box__text,
.status-strip__text {
  font-family: var(--font-meta);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-box {
  color: #2a201a;
  background:
    linear-gradient(180deg, rgba(248, 240, 223, 0.99), rgba(230, 214, 182, 0.99)),
    url("../images/textures/paper-grain.webp");
}

.quote-box blockquote {
  margin: 0;
  padding-left: 1rem;
  border-left: 4px solid var(--border-gold);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  line-height: 1.5;
}

.quote-box cite {
  display: block;
  margin-top: 0.7rem;
  color: #6a5a49;
  font-family: var(--font-meta);
  font-size: 0.78rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scrollbox {
  max-height: 300px;
  overflow: auto;
  padding: 0.85rem;
  border: 1px solid rgba(72, 54, 37, 0.45);
  background: rgba(255, 249, 235, 0.6);
  scrollbar-width: thin;
  scrollbar-color: #86673f #e5d4b6;
}

.scrollbox::-webkit-scrollbar {
  width: 12px;
}

.scrollbox::-webkit-scrollbar-track {
  background: #e5d4b6;
}

.scrollbox::-webkit-scrollbar-thumb {
  background: #86673f;
  border: 2px solid #e5d4b6;
}

.update-log,
.link-list,
.fact-list,
.definition-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.update-log li,
.link-list li,
.fact-list li {
  padding: 0.75rem;
  border: 1px solid rgba(111, 84, 49, 0.35);
  background: rgba(255, 248, 235, 0.58);
}

.update-log time,
.meta-stamp,
.list-stamp {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: #715b44;
  font-family: var(--font-meta);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fact-list li {
  display: grid;
  gap: 0.2rem;
}

.fact-list strong {
  color: #241b15;
  font-family: var(--font-meta);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-list {
  display: grid;
  gap: 1rem;
}

.article-card {
  position: relative;
  padding: 1rem;
  border: 2px solid var(--border-dark);
  background:
    linear-gradient(180deg, rgba(249, 240, 223, 0.98), rgba(227, 212, 181, 0.98));
  box-shadow: var(--shadow-panel);
}

.article-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(128, 98, 56, 0.34);
  pointer-events: none;
}

.article-card h2,
.article-card h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-heading);
  line-height: 1.08;
}

.article-card p {
  margin: 0.5rem 0 0;
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  margin-bottom: 0.6rem;
  color: #6a5a49;
  font-family: var(--font-meta);
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.banner-image,
.feature-image,
.inline-image {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--border-dark);
  background: #cab08b;
}

.banner-image img,
.feature-image img,
.inline-image img {
  width: 100%;
  object-fit: cover;
}

.banner-image img {
  aspect-ratio: 16 / 9;
}

.feature-image img {
  aspect-ratio: 4 / 3;
}

.inline-image img {
  aspect-ratio: 1 / 1;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.data-table th,
.data-table td {
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(96, 73, 44, 0.4);
  vertical-align: top;
}

.data-table th {
  color: #261d18;
  font-family: var(--font-meta);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  background: rgba(212, 190, 148, 0.58);
}

.data-table td {
  background: rgba(255, 249, 236, 0.68);
}

.callout,
.doctrine-box,
.rule-box {
  padding: 1rem;
  border: 2px solid var(--border-dark);
  background:
    linear-gradient(180deg, rgba(40, 48, 71, 0.95), rgba(29, 34, 48, 0.95));
  color: var(--text-inverse);
  box-shadow: var(--shadow-panel);
}

.callout h2,
.callout h3,
.doctrine-box h2,
.doctrine-box h3,
.rule-box h2,
.rule-box h3 {
  margin-top: 0;
  color: #f7e0a0;
}

.callout p:last-child,
.doctrine-box p:last-child,
.rule-box p:last-child {
  margin-bottom: 0;
}

.divider {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.25rem 0;
}

.divider svg {
  width: min(100%, 240px);
  height: 24px;
  fill: #8d6d3c;
}

.widget-stack {
  display: grid;
  gap: 1rem;
}

.site-footer {
  position: relative;
  padding: 1rem;
  border-top: 2px solid rgba(44, 31, 27, 0.45);
  background:
    linear-gradient(180deg, rgba(30, 22, 29, 0.95), rgba(22, 18, 24, 0.98));
  color: #e9d7b2;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
}

.site-footer__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #fff1cf;
}

.site-footer__meta {
  margin: 0;
  color: rgba(233, 215, 178, 0.86);
  font-family: var(--font-meta);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer a {
  color: #f0d793;
}

.status-widget,
.counter-widget,
.web-badge-wall,
.quote-widget {
  display: grid;
  gap: 0.7rem;
}

.web-badge-wall {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.web-badge-wall .small-badge,
.web-badge-wall .identity-badge {
  width: 100%;
  justify-content: center;
}

.tabs {
  display: grid;
  gap: 0.75rem;
}

.tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tabs__button {
  appearance: none;
  border: 2px solid var(--border-dark);
  background: linear-gradient(180deg, #f3e5ca 0%, #dcc197 100%);
  color: #281e17;
  padding: 0.45rem 0.75rem;
  font-family: var(--font-meta);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 245, 0.8),
    0 3px 0 rgba(79, 58, 33, 0.8);
}

.tabs__button.is-active {
  background: linear-gradient(180deg, #30384f 0%, #212838 100%);
  color: #f8e4b0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 3px 0 rgba(13, 15, 20, 0.92);
}

.tabs__panel {
  display: none;
}

.tabs__panel.is-active {
  display: block;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

.form-field label {
  color: #382c23;
  font-family: var(--font-meta);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(80, 60, 37, 0.5);
  background: rgba(255, 251, 242, 0.92);
  color: #261d18;
}

.form-field textarea {
  min-height: 160px;
  resize: vertical;
}

.site-stamp,
.best-viewed {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(231, 205, 152, 0.35);
  background: rgba(255, 245, 221, 0.06);
  color: #edd7a2;
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-stamp svg,
.best-viewed svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.is-hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.serif-heading {
  font-family: var(--font-heading);
}

.mono {
  font-family: var(--font-mono);
}

.muted {
  color: #6c5b4c;
}

.gold {
  color: var(--text-gold);
}

.flow > * + * {
  margin-top: 1rem;
}

@media (max-width: 1080px) {
  .site-shell {
    width: min(calc(100% - 1rem), var(--site-width));
  }

  .site-grid {
    grid-template-columns: 170px minmax(0, 1fr) 220px;
  }
}

@media (max-width: 920px) {
  .site-grid {
    grid-template-columns: 1fr;
  }

  .left-rail,
  .right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-slab,
  .site-footer__grid,
  .columns-2,
  .columns-3 {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid > .feature-main,
  .feature-grid > .feature-side {
    grid-column: auto;
  }

  .hero-panel__title {
    max-width: none;
  }

  .web-badge-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    background-size: auto, auto, 180px 180px, cover;
  }

  .site-shell {
    width: min(calc(100% - 0.5rem), var(--site-width));
    padding-top: 0.5rem;
  }

  .site-topline,
  .site-header,
  .site-grid,
  .site-footer {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .site-grid {
    gap: 0.75rem;
  }

  .left-rail,
  .right-rail {
    grid-template-columns: 1fr;
  }

  .site-brand {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .site-nav a,
  .button-link,
  .mini-button {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-panel__inner,
  .panel__inner,
  .sidebar-box__inner,
  .content-box__inner,
  .widget-box__inner,
  .archive-box__inner,
  .quote-box__inner,
  .profile-card__inner {
    padding: 0.85rem;
  }

  .profile-slab__photo img {
    aspect-ratio: 4 / 5;
  }

  .web-badge-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
  }
}