:root {
  color-scheme: light;
  --ink: #18212c;
  --muted: #65717f;
  --panel: #fffaf2;
  --surface: #eadcc7;
  --line: #c3ae91;
  --teal: #0c7c78;
  --teal-dark: #075956;
  --coral: #d85d49;
  --amber: #d39b2a;
  --green: #497c45;
  --slate: #30404d;
  --heading-main: #172b34;
  --heading-main-soft: #efe2d0;
  --heading-sub: #2f8b86;
  --heading-sub-soft: #e7f2ef;
  --shadow: 0 16px 36px rgba(24, 33, 44, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.72) 0%, rgba(244, 232, 214, 0.34) 46%, rgba(213, 184, 147, 0.28) 100%),
    repeating-linear-gradient(172deg, rgba(111, 82, 52, 0.1) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(184deg, transparent 0 56px, rgba(180, 125, 78, 0.09) 56px 58px, transparent 58px 112px),
    linear-gradient(145deg, #f6efe4 0%, #ead7bd 52%, #d7b58f 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 28px;
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.brand {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(12, 124, 120, 0.32);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #e9f4f2, #ffffff);
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  position: absolute;
  right: 6px;
  left: 6px;
  height: 2px;
  border-radius: 999px;
  background: var(--teal);
  content: "";
}

.brand-mark::before {
  top: 14px;
  transform: skewY(-18deg);
}

.brand-mark span {
  top: 22px;
  background: var(--coral);
  transform: skewY(14deg);
}

.brand-mark::after {
  top: 30px;
  background: var(--amber);
  transform: skewY(-10deg);
}

.brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-tab {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(213, 232, 229, 0.12);
  border-radius: var(--radius);
  color: #dcebea;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-tab:hover,
.nav-tab.active {
  border-color: rgba(116, 214, 202, 0.28);
  background: rgba(237, 246, 245, 0.13);
  color: #ffffff;
}

.tab-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: currentColor;
  font-weight: 700;
}

.tab-icon svg {
  width: 22px;
  height: 22px;
  overflow: visible;
}

.tab-icon svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-meter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.sidebar-meter > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.sidebar-meter strong,
.sidebar-meter span {
  display: block;
}

.sidebar-meter strong {
  font-size: 1.45rem;
  line-height: 1;
}

.sidebar-meter span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.workspace {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 44px) 40px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title actions"
    "daily daily";
  align-items: center;
  column-gap: 20px;
  row-gap: 12px;
  margin-bottom: 24px;
}

.site-title {
  grid-area: title;
}

.topbar-actions {
  display: flex;
  grid-area: actions;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.api-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(73, 124, 69, 0.28);
  border-radius: 999px;
  color: #315d31;
  background: #eef7ed;
  white-space: nowrap;
}

.api-pill.offline {
  border-color: rgba(216, 93, 73, 0.28);
  color: #8b392e;
  background: #fff0ec;
}

.daily-home-letters {
  display: grid;
  width: 100%;
  grid-area: daily;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.daily-home-letter {
  min-height: 82px;
}

.daily-home-letter .daily-drawer-toggle-title {
  font-size: 0.9rem;
}

body.seismotectonic-active .daily-home-letters {
  display: none;
}

body.seismotectonic-active .topbar {
  grid-template-areas: "title actions";
  margin-bottom: 12px;
}

body.seismotectonic-active #seismotectonic {
  scroll-margin-top: 0;
}

.daily-drawer-toggle {
  position: relative;
  display: inline-flex;
  grid-area: daily;
  min-width: min(238px, 100%);
  min-height: 72px;
  align-items: center;
  justify-self: center;
  gap: 12px;
  padding: 12px 18px 12px 16px;
  border: 1px solid rgba(126, 100, 68, 0.42);
  border-radius: 9px;
  color: #3f2a02;
  background:
    linear-gradient(180deg, #fffefa 0%, #fff8ec 100%);
  box-shadow: 0 14px 30px rgba(86, 62, 30, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  font-weight: 900;
  overflow: hidden;
  white-space: nowrap;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.daily-drawer-toggle::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(30deg, transparent 49%, rgba(126, 100, 68, 0.34) 50%, transparent 51%) left center / 50% 100% no-repeat,
    linear-gradient(-30deg, transparent 49%, rgba(126, 100, 68, 0.34) 50%, transparent 51%) right center / 50% 100% no-repeat,
    linear-gradient(180deg, transparent 0 46%, rgba(126, 100, 68, 0.16) 46% 47%, transparent 47%);
  content: "";
  pointer-events: none;
}

.daily-drawer-toggle::after {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 46px;
  height: 14px;
  border: 1px solid rgba(126, 100, 68, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  content: "";
  pointer-events: none;
}

.daily-drawer-toggle:hover,
.daily-drawer-toggle[aria-expanded="true"] {
  border-color: rgba(126, 100, 68, 0.62);
  box-shadow: 0 18px 38px rgba(86, 62, 30, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transform: translateY(-2px);
}

.daily-drawer-toggle[aria-expanded="true"] {
  background:
    linear-gradient(180deg, #fff8e8 0%, #ffffff 100%);
}

.daily-drawer-toggle-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #d39b2a;
  box-shadow: 0 0 0 5px rgba(213, 155, 42, 0.14);
}

.daily-drawer-toggle-mark::before {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff8e8;
  content: "";
}

.daily-drawer-toggle-mark::after {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(213, 155, 42, 0.42);
  border-radius: inherit;
  animation: dailyPulse 2.4s ease-out infinite;
  content: "";
}

.daily-drawer-toggle-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  text-align: left;
  line-height: 1.05;
}

.daily-drawer-toggle-title {
  color: #2f2107;
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.daily-drawer-toggle-count {
  color: #6b4a05;
  font-size: 0.7rem;
  font-weight: 900;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(73, 124, 69, 0.3);
  animation: pulse 1.8s infinite;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading p {
  max-width: 740px;
  margin: 8px 0 0;
  color: var(--muted);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 48px;
  gap: 10px;
  margin-bottom: 12px;
}

.search-box {
  position: relative;
  display: block;
}

.field-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-box input,
.toolbar select,
.qa-composer textarea,
.chat-form textarea,
.field-stack input,
.field-stack textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel);
  outline: none;
}

.search-box input,
.toolbar select,
.field-stack input {
  min-height: 48px;
}

.search-box input {
  padding: 0 14px 0 42px;
}

.toolbar select {
  padding: 0 12px;
}

.search-box input:focus,
.toolbar select:focus,
.qa-composer textarea:focus,
.chat-form textarea:focus,
.field-stack input:focus,
.field-stack textarea:focus {
  border-color: rgba(12, 124, 120, 0.64);
  box-shadow: 0 0 0 3px rgba(12, 124, 120, 0.12);
}

.icon-button,
.text-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel);
}

.icon-button {
  display: grid;
  width: 48px;
  min-width: 48px;
  height: 48px;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 800;
}

.icon-button.primary,
.text-button {
  border-color: var(--teal);
  color: #ffffff;
  background: var(--teal);
}

.icon-button.primary:hover,
.text-button:hover {
  background: var(--teal-dark);
}

.text-button {
  min-height: 42px;
  padding: 0 16px;
  font-weight: 700;
}

.text-button.ghost {
  border-color: var(--line);
  color: var(--slate);
  background: var(--panel);
}

.text-button.ghost:hover {
  color: var(--teal-dark);
  background: #edf6f5;
}

.hidden {
  display: none !important;
}

.keyword-row,
.sample-questions,
.group-nav,
.subgroup-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-row {
  margin-bottom: 18px;
}

.sample-questions {
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.group-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 10px;
}

.group-filter[data-group="Seismic Acquisition"] {
  --group-main: #0c7c78;
  --group-main-dark: #075956;
  --group-main-soft: #dff2ef;
  --group-main-ring: rgba(12, 124, 120, 0.42);
}

.group-filter[data-group="Seismic Processing"] {
  --group-main: #a76517;
  --group-main-dark: #74450d;
  --group-main-soft: #f8e4bf;
  --group-main-ring: rgba(167, 101, 23, 0.42);
}

.group-filter[data-group="Seismic Interpretation"] {
  --group-main: #7a4264;
  --group-main-dark: #56304a;
  --group-main-soft: #f1ddea;
  --group-main-ring: rgba(122, 66, 100, 0.42);
}

.group-filter[data-group="Seismic Attributes"] {
  --group-main: #a7c6cc;
  --group-main-dark: #668d98;
  --group-main-soft: #e8f1f2;
  --group-main-ring: rgba(102, 141, 152, 0.42);
  color: #173e49;
  box-shadow: 0 8px 18px rgba(70, 110, 120, 0.12);
}

.group-filter[data-group="Seismic Attributes"]:hover,
.group-filter[data-group="Seismic Attributes"].active {
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(70, 110, 120, 0.2);
}

.group-filter {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--group-main-ring, rgba(23, 43, 52, 0.36));
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--group-main, var(--heading-main));
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(23, 43, 52, 0.12);
}

.group-filter small {
  display: inline-grid;
  min-width: 26px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: var(--group-main-dark, var(--heading-main));
  background: var(--group-main-soft, var(--heading-main-soft));
  font-size: 0.78rem;
}

.group-filter:hover,
.group-filter.active {
  border-color: var(--group-main-dark, rgba(23, 43, 52, 0.64));
  color: #ffffff;
  background: var(--group-main-dark, #0f2028);
  box-shadow: 0 10px 24px rgba(23, 43, 52, 0.18);
}

.subgroup-nav[data-group="Seismic Acquisition"] {
  --subgroup-text: #236c68;
  --subgroup-text-active: #063f3d;
  --subgroup-border: rgba(12, 124, 120, 0.32);
  --subgroup-border-active: rgba(12, 124, 120, 0.72);
  --subgroup-bg: #edf6f4;
  --subgroup-bg-active: #cfe9e6;
  --subgroup-count-bg: #dff0ee;
  --subgroup-count-bg-active: #a9d8d2;
}

.subgroup-nav[data-group="Seismic Processing"] {
  --subgroup-text: #7b4a09;
  --subgroup-text-active: #573406;
  --subgroup-border: rgba(167, 101, 23, 0.3);
  --subgroup-border-active: rgba(167, 101, 23, 0.68);
  --subgroup-bg: #fff4df;
  --subgroup-bg-active: #f1d59d;
  --subgroup-count-bg: #f8e4bf;
  --subgroup-count-bg-active: #e7be76;
}

.subgroup-nav[data-group="Seismic Interpretation"] {
  --subgroup-text: #743b58;
  --subgroup-text-active: #51283d;
  --subgroup-border: rgba(122, 66, 100, 0.3);
  --subgroup-border-active: rgba(122, 66, 100, 0.68);
  --subgroup-bg: #f9edf4;
  --subgroup-bg-active: #edcfde;
  --subgroup-count-bg: #f1ddea;
  --subgroup-count-bg-active: #dcaec7;
}

.subgroup-nav[data-group="Seismic Attributes"] {
  --subgroup-text: #496f79;
  --subgroup-text-active: #284f59;
  --subgroup-border: rgba(102, 141, 152, 0.32);
  --subgroup-border-active: rgba(78, 123, 134, 0.7);
  --subgroup-bg: #f1f6f6;
  --subgroup-bg-active: #dcebed;
  --subgroup-count-bg: #e6f0f1;
  --subgroup-count-bg-active: #bfd7dc;
}

.interpretation-topic-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.interpretation-topic-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid rgba(122, 66, 100, 0.22);
  border-radius: var(--radius);
  color: #68374f;
  background: rgba(251, 244, 248, 0.78);
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.interpretation-topic-button > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.interpretation-topic-button strong {
  color: inherit;
  font-size: 0.9rem;
}

.interpretation-topic-button small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.35;
}

.interpretation-topic-button b {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #6f3c56;
  background: #f0dbe6;
  font-size: 0.82rem;
}

.interpretation-topic-button:hover,
.interpretation-topic-button.active {
  border-color: rgba(122, 66, 100, 0.56);
  color: #4f293d;
  background: #f3dfe9;
  box-shadow: 0 8px 20px rgba(76, 38, 58, 0.08);
}

.interpretation-topic-button.active b {
  color: #ffffff;
  background: #7a4264;
}

.structural-topic-overview {
  display: grid;
  gap: 14px;
  margin: 0 0 14px;
  padding: 18px;
  border: 1px solid rgba(122, 66, 100, 0.22);
  border-radius: calc(var(--radius) + 3px);
  background: linear-gradient(135deg, rgba(250, 244, 247, 0.96), rgba(244, 248, 246, 0.96));
  box-shadow: 0 9px 26px rgba(52, 38, 47, 0.05);
}

.structural-topic-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(122, 66, 100, 0.14);
}

.structural-topic-hero > div:first-child {
  max-width: 760px;
}

.structural-topic-hero > div:first-child > span,
.structural-card-heading span,
.structural-topic-roadmap > span {
  color: #7a4264;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.structural-topic-hero h2 {
  margin: 4px 0 6px;
  color: var(--heading-main);
  font-size: 1.28rem;
}

.structural-topic-hero p,
.structural-topic-roadmap p,
.stress-matrix-caveat {
  margin: 0;
  color: var(--slate);
  font-size: 0.86rem;
  line-height: 1.55;
}

.structural-topic-metrics {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 360px;
}

.structural-topic-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid rgba(122, 66, 100, 0.16);
  border-radius: 999px;
  color: #694156;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
}

.structural-topic-metrics span.review {
  border-color: rgba(180, 111, 45, 0.24);
  color: #83521c;
  background: #fff6e8;
}

.structural-topic-metrics strong {
  font-size: 0.88rem;
}

.structural-topic-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.45fr);
  gap: 12px;
  align-items: stretch;
}

.stress-matrix-card,
.structural-topic-roadmap {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(122, 66, 100, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.structural-card-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.structural-card-heading h3,
.structural-topic-roadmap h3 {
  margin: 3px 0 0;
  color: var(--heading-main);
  font-size: 0.98rem;
}

.structural-card-heading small {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.stress-matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.stress-matrix {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.stress-matrix th,
.stress-matrix td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.35;
}

.stress-matrix th {
  color: #5f3349;
  background: #f7ebf1;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.stress-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.stress-matrix-caveat {
  margin-top: 9px;
  padding: 9px 10px;
  border-left: 3px solid rgba(122, 66, 100, 0.42);
  background: rgba(247, 235, 241, 0.64);
  font-size: 0.76rem;
}

.structural-topic-references {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.structural-topic-references > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.structural-topic-references a,
.structural-topic-roadmap > a {
  padding: 5px 8px;
  border: 1px solid rgba(12, 124, 120, 0.2);
  border-radius: 999px;
  color: #236c68;
  background: #edf6f4;
  font-size: 0.72rem;
  font-weight: 750;
}

.structural-topic-roadmap {
  display: grid;
  align-content: start;
  gap: 7px;
}

.structural-topic-roadmap > div {
  display: grid;
  gap: 7px;
  margin: 4px 0 3px;
}

.structural-topic-roadmap > div > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(122, 66, 100, 0.13);
  border-radius: 9px;
  background: #fbf6f8;
}

.structural-topic-roadmap strong {
  color: #62364d;
  font-size: 0.78rem;
}

.structural-topic-roadmap small {
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.structural-topic-roadmap > a {
  justify-self: start;
  margin-top: 2px;
}

.subgroup-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
  gap: 6px;
  max-height: 184px;
  margin: 0 0 14px;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.subgroup-filter {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--subgroup-border, rgba(47, 139, 134, 0.24));
  border-radius: 6px;
  color: var(--subgroup-text, #2c7774);
  background: var(--subgroup-bg, var(--heading-sub-soft));
  font-size: 0.76rem;
  font-weight: 720;
  line-height: 1.15;
  text-align: left;
}

.subgroup-filter small {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 6px;
  color: var(--subgroup-text, #367d79);
  background: var(--subgroup-count-bg, #dff0ee);
  font-size: 0.66rem;
  font-weight: 800;
}

.subgroup-filter:hover,
.subgroup-filter.active {
  border-color: var(--subgroup-border-active, rgba(47, 139, 134, 0.48));
  color: var(--subgroup-text-active, #1d6561);
  background: var(--subgroup-bg-active, #d8efec);
}

.subgroup-filter.active small {
  color: var(--subgroup-text-active, #1d6561);
  background: var(--subgroup-count-bg-active, #c4e6e2);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--slate);
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
}

button.chip:hover,
button.chip.active {
  border-color: rgba(216, 93, 73, 0.48);
  color: #8b392e;
  background: #fff0ec;
}

.glossary-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(360px, 1.18fr);
  gap: 18px;
  align-items: start;
}

.structural-audit-workspace {
  display: grid;
  gap: 22px;
}

.audit-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 28px;
  border: 1px solid rgba(12, 124, 120, 0.22);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, rgba(236, 247, 245, 0.96), rgba(250, 245, 235, 0.96));
  box-shadow: 0 10px 30px rgba(24, 33, 44, 0.05);
}

.audit-hero h2,
.audit-section-heading h2 {
  margin: 4px 0 8px;
  color: var(--heading-main);
}

.audit-hero p,
.audit-method p,
.audit-finding p,
.audit-footnote {
  margin: 0;
  color: var(--slate);
  line-height: 1.62;
}

.audit-kicker,
.audit-section-heading span,
.audit-method span {
  color: var(--heading-sub);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audit-exit {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid rgba(12, 124, 120, 0.28);
  border-radius: 999px;
  color: var(--heading-sub);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 700;
}

.audit-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.audit-summary-grid article {
  display: grid;
  gap: 5px;
  min-height: 108px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.audit-summary-grid strong {
  color: var(--heading-main);
  font-size: 1.75rem;
}

.audit-summary-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.audit-summary-grid .audit-summary-alert {
  border-color: rgba(190, 73, 55, 0.28);
  background: #fff4f0;
}

.audit-summary-grid .audit-summary-review {
  border-color: rgba(173, 126, 39, 0.28);
  background: #fff9e9;
}

.audit-method {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.audit-method div {
  display: grid;
  gap: 6px;
  align-content: start;
}

.audit-method p {
  font-size: 0.88rem;
}

.audit-section {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: rgba(255, 255, 255, 0.72);
}

.audit-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.audit-section-heading h2 {
  font-size: 1.16rem;
}

.audit-section-heading > strong {
  color: var(--muted);
  font-size: 0.86rem;
}

.audit-finding {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 0.9fr);
  gap: 16px 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.audit-finding-priority {
  border-color: rgba(190, 73, 55, 0.3);
  background: #fff8f5;
}

.audit-finding h3 {
  margin: 7px 0 5px;
}

.audit-record-pair {
  display: grid;
  gap: 8px;
}

.audit-record-pair div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(190, 73, 55, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.audit-record-pair span {
  color: var(--muted);
  font-size: 0.84rem;
}

.audit-recommendation {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid rgba(190, 73, 55, 0.14);
}

.audit-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.audit-category-grid article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 139, 134, 0.16);
  border-radius: 11px;
  background: var(--heading-sub-soft);
}

.audit-category-grid span {
  color: var(--slate);
  font-size: 0.86rem;
}

.audit-category-grid strong {
  color: var(--heading-sub);
  font-size: 1.08rem;
}

.audit-table-wrap {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.audit-table th,
.audit-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.audit-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--heading-main);
  background: #f4f8f7;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.audit-table td:first-child,
.audit-table td:nth-child(4) {
  display: grid;
  gap: 4px;
}

.audit-table td:first-child span,
.audit-table td:nth-child(4) span {
  color: var(--muted);
  font-size: 0.78rem;
}

.audit-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  color: #38625f;
  background: #eaf5f3;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.audit-status-priority {
  color: #8e3d31;
  background: #fde8e2;
}

.audit-footnote {
  font-size: 0.82rem;
}

@media (max-width: 1040px) {
  .structural-topic-body {
    grid-template-columns: 1fr;
  }

  .structural-topic-roadmap > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audit-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .interpretation-topic-nav {
    grid-template-columns: 1fr;
  }

  .structural-topic-hero,
  .structural-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .structural-topic-metrics {
    justify-content: flex-start;
    max-width: none;
  }

  .structural-card-heading small {
    text-align: left;
  }

  .structural-topic-roadmap > div {
    grid-template-columns: 1fr;
  }

  .audit-hero,
  .audit-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-summary-grid,
  .audit-method,
  .audit-category-grid,
  .audit-finding {
    grid-template-columns: 1fr;
  }

  .audit-recommendation {
    grid-column: auto;
  }
}

.term-list {
  display: grid;
  max-height: calc(100vh - 254px);
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding-right: 4px;
}

.term-group {
  display: grid;
  gap: 10px;
}

.term-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px 2px;
  color: var(--heading-main);
}

.term-group-heading h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.term-group-heading span {
  color: var(--muted);
  font-size: 0.82rem;
}

.search-results-more {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(47, 139, 134, 0.32);
  border-radius: var(--radius);
  background: var(--heading-sub-soft);
  color: var(--heading-main);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.search-results-more:hover,
.search-results-more:focus-visible {
  border-color: var(--accent);
  background: rgba(47, 139, 134, 0.16);
  outline: none;
}

.term-subgroup {
  display: grid;
  gap: 10px;
}

.term-subgroup + .term-subgroup {
  margin-top: 14px;
}

.term-subgroup-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(47, 139, 134, 0.2);
  border-radius: var(--radius);
  background: var(--heading-sub-soft);
}

.term-subgroup-heading h4 {
  margin: 0;
  color: var(--heading-sub);
  font-size: 0.9rem;
  line-height: 1.25;
}

.term-subgroup-heading span {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.term-subgroup.empty .term-subgroup-heading {
  border-color: var(--line);
  background: #f8fbfb;
}

.subgroup-empty {
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
}

.term-card {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 6px 20px rgba(24, 33, 44, 0.04);
  text-align: left;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.term-card:hover {
  border-color: rgba(12, 124, 120, 0.36);
  background: #fffaf2;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.term-card.active {
  border-color: rgba(12, 124, 120, 0.48);
  background: #f8f0e4;
  box-shadow: var(--shadow);
}

.term-card.active:hover {
  border-color: rgba(111, 82, 52, 0.42);
  background: #f1e5d3;
}

.term-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.term-tags {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 46%;
}

.category-tag {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #315d31;
  background: #eef7ed;
  font-size: 0.76rem;
  font-weight: 800;
}

.group-tag {
  color: #8b392e;
  background: #fff0ec;
}

.term-card h3 {
  margin: 0;
}

.english {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.term-card p {
  margin: 0;
  color: var(--slate);
  line-height: 1.5;
}

.term-card .keyword-row {
  margin-bottom: 0;
}

.detail-panel,
.answer-panel,
.qa-composer,
.chat-shell,
.visual-panel,
.feedback-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(24, 33, 44, 0.07);
}

.detail-panel {
  min-height: 620px;
  overflow: hidden;
}

.detail-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff, #edf6f5);
}

.detail-hero h2 {
  font-size: clamp(1.7rem, 2.8vw, 3rem);
}

.detail-hero .english {
  font-size: 1rem;
}

.mini-visual {
  min-height: 230px;
  border: 1px solid rgba(12, 124, 120, 0.18);
  border-radius: var(--radius);
  background: #f8fbfb;
  overflow: hidden;
}

.detail-body {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.info-block {
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.info-block h3 {
  color: var(--teal-dark);
  font-size: 0.95rem;
}

.info-block p {
  margin: 0;
  color: var(--slate);
  line-height: 1.56;
}

.attribute-hero {
  grid-template-columns: minmax(0, 1.22fr) minmax(250px, 0.78fr);
  background: linear-gradient(135deg, #ffffff, #edf5f8);
}

.attribute-profile {
  align-self: stretch;
  padding: 16px;
  border: 1px solid rgba(53, 105, 129, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.attribute-profile > span {
  display: block;
  margin-bottom: 14px;
  color: #315f72;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.attribute-profile dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.attribute-profile dl div {
  display: grid;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid rgba(53, 105, 129, 0.16);
}

.attribute-profile dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.attribute-profile dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.35;
}

.attribute-detail-body {
  gap: 18px;
}

.attribute-core-grid,
.attribute-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.attribute-block,
.attribute-context-grid > section,
.attribute-keywords {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.attribute-block h3,
.attribute-context-grid h3,
.attribute-keywords h3 {
  margin: 0 0 10px;
  color: #315f72;
  font-size: 0.92rem;
}

.attribute-strength {
  border-left: 4px solid #4d8a6b;
}

.attribute-risk {
  border-left: 4px solid #c65b4b;
  background: #fff9f7;
}

.attribute-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--slate);
  line-height: 1.48;
}

.attribute-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.attribute-chip-row,
.attribute-relation-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.attribute-chip-row span {
  padding: 5px 8px;
  border: 1px solid rgba(53, 105, 129, 0.25);
  border-radius: 6px;
  color: #284f61;
  background: #edf5f8;
  font-size: 0.78rem;
  font-weight: 720;
}

.attribute-keywords .keyword-row {
  margin: 0;
}

.attribute-workspace {
  scroll-margin-top: 16px;
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.attribute-workspace-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(102, 141, 152, 0.4);
  border-radius: 6px;
  background: #eef5f5;
}

.attribute-workspace-header > div:first-child {
  display: grid;
  gap: 2px;
}

.attribute-workspace-header span,
.workflow-objective-header span,
.workflow-evidence-principle span,
.workflow-prerequisites span,
.workflow-sequence header span,
.workflow-checklist header span,
.workflow-sources > span {
  color: #52707d;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.attribute-workspace-header h2 {
  margin: 2px 0 0;
  color: #183743;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.attribute-workspace-header p {
  margin: 4px 0 0;
  color: #52707d;
  font-size: 0.82rem;
  line-height: 1.4;
}

.attribute-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 360px;
  padding: 3px;
  border: 1px solid rgba(102, 141, 152, 0.34);
  border-radius: 6px;
  background: #e5eff0;
}

.attribute-mode-switch button {
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 4px;
  color: #426473;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 780;
}

.attribute-mode-switch button:hover,
.attribute-mode-switch button.active {
  color: #ffffff;
  background: #668d98;
}

.workflow-objective-control {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 0.62fr);
  gap: 14px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(102, 141, 152, 0.3);
  border-radius: 6px;
  background: #ffffff;
}

.workflow-objective-control label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.workflow-objective-control label > span {
  color: #315f72;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.workflow-objective-control select {
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid rgba(53, 105, 129, 0.44);
  border-radius: 5px;
  color: #183743;
  background: #f7fafb;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
}

.workflow-stage-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.workflow-stage-overview > div {
  --overview-color: #356981;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  min-height: 42px;
  padding: 7px 9px;
  border-top: 3px solid var(--overview-color);
  background: #edf5f8;
}

.workflow-stage-overview > div[data-stage="validate"] {
  --overview-color: #4d765e;
  background: #eef5f0;
}

.workflow-stage-overview > div[data-stage="refine"] {
  --overview-color: #a76517;
  background: #fff5e5;
}

.workflow-stage-overview span {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--overview-color);
  font-size: 0.66rem;
  font-weight: 900;
}

.workflow-stage-overview strong {
  color: var(--overview-color);
  font-size: 0.8rem;
}

.workflow-stage-overview small {
  color: #5f737b;
  font-size: 0.67rem;
  font-weight: 720;
}

.attribute-workflow-surface {
  display: grid;
  gap: 18px;
}

.workflow-ai-guide {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(31, 117, 122, 0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(234, 247, 246, 0.96), rgba(248, 251, 250, 0.98));
  box-shadow: 0 12px 28px rgba(23, 67, 70, 0.08);
}

.workflow-ai-guide > header,
.workflow-ai-result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.workflow-ai-guide > header span:first-child,
.workflow-ai-result-heading span,
.workflow-ai-match-grid article > span {
  color: #1d7377;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-ai-guide h3,
.workflow-ai-result h4,
.workflow-ai-result h5 {
  margin: 4px 0 0;
  color: #163f42;
}

.workflow-ai-guide header p,
.workflow-ai-result p {
  margin: 6px 0 0;
  color: #4b6264;
  line-height: 1.55;
}

.workflow-ai-boundary {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(154, 92, 30, 0.24);
  border-radius: 999px;
  background: #fff8eb;
  color: #8a531d;
  font-size: 0.76rem;
  font-weight: 800;
}

.workflow-ai-guide form {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(210px, 0.8fr) auto;
  align-items: end;
  gap: 12px;
}

.workflow-ai-guide form label {
  display: grid;
  gap: 7px;
  color: #304f51;
  font-size: 0.78rem;
  font-weight: 800;
}

.workflow-ai-guide textarea,
.workflow-ai-guide select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(41, 91, 94, 0.24);
  border-radius: 11px;
  background: #fff;
  color: #233f41;
  font: inherit;
  resize: vertical;
}

.workflow-ai-guide form button,
.workflow-ai-match-grid button {
  border: 0;
  border-radius: 11px;
  background: #1f7478;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.workflow-ai-guide form > button {
  min-height: 44px;
  padding: 0 16px;
}

.workflow-ai-result {
  padding: 16px;
  border: 1px solid rgba(41, 91, 94, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.workflow-ai-match-grid,
.workflow-ai-evidence-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.workflow-ai-result-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(41, 91, 94, 0.14);
}

.workflow-ai-indicator-match {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(147, 99, 38, 0.22);
  border-radius: 10px;
  background: #fff8ee;
}

.workflow-ai-indicator-match span {
  color: #98601f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workflow-ai-indicator-match small {
  color: #765a46;
}

.workflow-ai-result-section > h5 {
  margin: 0;
  font-size: 0.95rem;
}

.workflow-ai-result-section > p {
  margin-top: 4px;
  font-size: 0.82rem;
}

.workflow-ai-result-section.observed > h5 {
  color: #315f86;
}

.workflow-ai-result-section.recommended > h5 {
  color: #1d7377;
}

.workflow-ai-result-section.deferred > h5 {
  color: #9a541f;
}

.workflow-ai-result-section.support > h5 {
  color: #835220;
}

.workflow-ai-match-grid article.observed {
  border-color: rgba(49, 95, 134, 0.24);
  background: #f4f8fc;
}

.workflow-ai-match-grid article.deferred {
  border-color: rgba(165, 86, 35, 0.24);
  background: #fff8ee;
}

.workflow-ai-match-grid article.support {
  border-color: rgba(147, 99, 38, 0.22);
  background: #fffaf3;
}

.workflow-ai-match-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-ai-evidence-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workflow-ai-match-grid article,
.workflow-ai-evidence-grid section {
  padding: 13px;
  border: 1px solid rgba(41, 91, 94, 0.14);
  border-radius: 12px;
  background: #fff;
}

.workflow-ai-match-grid article p {
  min-height: 3.1em;
  font-size: 0.86rem;
}

.workflow-ai-match-grid button {
  margin-top: 10px;
  padding: 7px 10px;
  background: #e5f3f2;
  color: #1d696d;
}

.workflow-ai-evidence-grid ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #3f5759;
  line-height: 1.5;
}

.workflow-ai-evidence-grid li + li {
  margin-top: 7px;
}

.workflow-ai-disclaimer {
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px solid rgba(41, 91, 94, 0.14);
  font-size: 0.82rem;
}

.workflow-ai-warning {
  color: #8a531d !important;
}

.workflow-ai-context-warning {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(165, 86, 35, 0.28);
  border-radius: 12px;
  background: #fff8ee;
}

.workflow-ai-context-warning > span {
  color: #9a541f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-ai-context-warning h4,
.workflow-ai-context-warning p {
  margin: 0;
}

.workflow-ai-context-warning button {
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: #8e4f22;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.workflow-ai-context-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid rgba(165, 86, 35, 0.28);
  border-radius: 999px;
  background: #fff8ee;
  color: #8e4f22;
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
}

.source-status-badge.provisional {
  border-color: rgba(34, 112, 121, 0.28);
  background: #eef8f8;
  color: #266d72;
}

.source-status-notice,
.attribute-review-status {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(165, 86, 35, 0.28);
  border-radius: 10px;
  background: #fff8ee;
}

.source-status-notice p,
.attribute-review-status p,
.attribute-review-status h3 {
  margin: 0;
}

.source-status-notice.provisional {
  border-color: rgba(34, 112, 121, 0.28);
  background: #eef8f8;
}

.workflow-ai-context-warning small {
  color: #765a46;
}

.workflow-objective-header {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 22px;
  padding: 18px;
  border: 1px solid rgba(53, 105, 129, 0.28);
  border-radius: 6px;
  background: #f7fafb;
}

.workflow-objective-header h2 {
  margin: 4px 0 2px;
  color: #183743;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.workflow-objective-header p {
  margin: 8px 0 0;
  color: var(--slate);
  line-height: 1.55;
}

.workflow-objective-header .workflow-turkish-title {
  margin: 0;
  color: #52707d;
  font-size: 0.88rem;
  font-weight: 760;
}

.workflow-objective-header aside {
  padding-left: 18px;
  border-left: 3px solid #c65b4b;
}

.workflow-objective-header aside p {
  color: #263d47;
  font-weight: 680;
}

.workflow-evidence-principle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-evidence-principle > div {
  padding: 0 14px;
  border-left: 3px solid #4d8a6b;
}

.workflow-evidence-principle > div:last-child {
  border-left-color: #a76517;
}

.workflow-evidence-principle p,
.workflow-prerequisites p {
  margin: 5px 0 0;
  color: var(--slate);
  line-height: 1.55;
}

.workflow-prerequisites {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) minmax(0, 0.72fr);
  gap: 18px;
  align-items: start;
  padding: 14px 0;
}

.workflow-indicator-section {
  padding: 18px;
  border: 1px solid rgba(147, 99, 38, 0.24);
  border-radius: 16px;
  background: #fffaf1;
}

.workflow-indicator-section > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.workflow-indicator-section > header span,
.workflow-indicator-grid article > span,
.workflow-indicator-grid footer > span {
  color: #98601f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.workflow-indicator-section h3,
.workflow-indicator-grid h4 {
  margin: 4px 0 0;
  color: #523b22;
}

.workflow-indicator-section > header > strong {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f4e5cb;
  color: #7e4d18;
  font-size: 0.75rem;
}

.workflow-indicator-intro {
  margin: 8px 0 0;
  color: #6f5b43;
  line-height: 1.5;
}

.workflow-indicator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.workflow-indicator-grid article {
  padding: 14px;
  border: 1px solid rgba(147, 99, 38, 0.18);
  border-radius: 12px;
  background: #fff;
}

.workflow-indicator-grid article > p,
.workflow-indicator-limitation {
  color: #5f5141;
  line-height: 1.5;
}

.workflow-indicator-limitation {
  margin-top: 10px;
  padding: 10px;
  border-radius: 9px;
  background: #fff5e4;
  font-size: 0.84rem;
}

.workflow-indicator-limitation strong {
  display: block;
  margin-bottom: 3px;
  color: #8c531b;
}

.workflow-indicator-grid footer {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.workflow-evidence-target-section {
  padding: 18px;
  border: 1px solid rgba(43, 104, 105, 0.24);
  border-radius: 16px;
  background: #f4fbf9;
}

.workflow-evidence-target-section > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.workflow-evidence-target-section > header span,
.workflow-evidence-target-grid footer span {
  color: #1d7377;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.workflow-evidence-target-section h3,
.workflow-evidence-target-grid h4 {
  margin: 4px 0 0;
  color: #224c4d;
}

.workflow-evidence-target-section > header > strong {
  padding: 6px 9px;
  border-radius: 999px;
  background: #dcefeb;
  color: #1d676a;
  font-size: 0.75rem;
}

.workflow-evidence-target-section > p {
  margin: 8px 0 0;
  color: #526b6c;
}

.workflow-evidence-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.workflow-evidence-target-grid article {
  padding: 14px;
  border: 1px solid rgba(43, 104, 105, 0.18);
  border-radius: 12px;
  background: #fff;
}

.workflow-evidence-target-grid article > p,
.workflow-evidence-target-grid article > div,
.workflow-evidence-target-grid footer p {
  color: #516667;
  line-height: 1.5;
}

.workflow-evidence-target-grid article > div {
  margin-top: 9px;
  padding: 9px;
  border-radius: 9px;
  background: #eef8f5;
  font-size: 0.84rem;
}

.workflow-evidence-target-grid article > div strong {
  display: block;
  color: #28686a;
}

.workflow-evidence-target-grid footer {
  margin-top: 10px;
}

.workflow-prerequisites h3,
.workflow-sequence h3,
.workflow-checklist h3 {
  margin: 4px 0 0;
  color: #203c48;
  font-size: 1rem;
}

.workflow-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.workflow-stage {
  --stage-color: #356981;
  --stage-soft: #edf5f8;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.workflow-stage[data-stage="validate"] {
  --stage-color: #4d765e;
  --stage-soft: #eef5f0;
}

.workflow-stage[data-stage="refine"] {
  --stage-color: #a76517;
  --stage-soft: #fff5e5;
}

.workflow-stage > header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-height: 92px;
  padding: 12px;
  border-top: 3px solid var(--stage-color);
  background: var(--stage-soft);
}

.workflow-stage > header > span {
  color: var(--stage-color);
  font-size: 0.75rem;
  font-weight: 900;
}

.workflow-stage > header h3 {
  margin: 0;
  color: var(--stage-color);
  font-size: 1.02rem;
}

.workflow-stage > header strong {
  display: block;
  margin-top: 2px;
  color: #2e4650;
  font-size: 0.72rem;
}

.workflow-stage > header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.workflow-stage-items {
  display: grid;
  gap: 10px;
}

.workflow-stage-group + .workflow-stage-group {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(41, 91, 94, 0.14);
}

.workflow-stage-group > h4 {
  margin: 0 0 10px;
  color: #245f63;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.workflow-stage-group.contextual-records > h4 {
  color: #835220;
}

.workflow-attribute-card {
  display: grid;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(53, 105, 129, 0.23);
  border-top: 3px solid var(--stage-color);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(24, 33, 44, 0.05);
}

.workflow-attribute-card[data-record-kind="interpretation-evidence"],
.workflow-attribute-card[data-record-kind="input-volume"],
.workflow-attribute-card[data-record-kind="advanced-analysis-product"],
.workflow-attribute-card[data-record-kind="workflow-operation"] {
  border-color: rgba(147, 99, 38, 0.22);
  background: #fffaf3;
}

.workflow-attribute-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.workflow-attribute-card > header span,
.workflow-attribute-card footer > div > span,
.workflow-control-question span {
  display: block;
  color: #6b7d84;
  font-size: 0.62rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workflow-attribute-card h4 {
  margin: 3px 0 0;
  color: #1f3741;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.workflow-open-button {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid rgba(53, 105, 129, 0.28);
  border-radius: 4px;
  color: #315f72;
  background: #f3f8fa;
  font-size: 0.66rem;
  font-weight: 780;
}

.workflow-open-button:hover {
  color: #ffffff;
  background: #315f72;
}

.workflow-role {
  margin: 0;
  color: #293f48;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.workflow-evidence-pair {
  display: grid;
  gap: 8px;
  margin: 0;
}

.workflow-evidence-pair div {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.workflow-evidence-pair dt {
  color: var(--stage-color);
  font-size: 0.68rem;
  font-weight: 850;
}

.workflow-evidence-pair dd {
  margin: 3px 0 0;
  color: var(--slate);
  font-size: 0.76rem;
  line-height: 1.45;
}

.workflow-card-assessment {
  display: grid;
  gap: 7px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-card-assessment p,
.workflow-control-question p,
.workflow-attribute-card footer p {
  margin: 0;
  color: var(--slate);
  font-size: 0.74rem;
  line-height: 1.45;
}

.workflow-card-assessment strong {
  display: block;
  margin-bottom: 2px;
  color: #3d684e;
  font-size: 0.66rem;
}

.workflow-card-assessment p:nth-child(2) strong {
  color: #866018;
}

.workflow-card-assessment .risk strong {
  color: #a5483c;
}

.workflow-control-question {
  padding: 9px;
  border-left: 3px solid var(--stage-color);
  background: var(--stage-soft);
}

.workflow-control-question p {
  margin-top: 4px;
  color: #263d47;
  font-weight: 650;
}

.workflow-attribute-card footer {
  display: grid;
  gap: 9px;
}

.workflow-combination-row,
.workflow-reference-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.workflow-combination-row button,
.workflow-reference-row a {
  padding: 4px 6px;
  border: 1px solid rgba(53, 105, 129, 0.25);
  border-radius: 4px;
  color: #315f72;
  background: #f4f8fa;
  font-size: 0.66rem;
  font-weight: 720;
  text-decoration: none;
}

.workflow-combination-row button:hover,
.workflow-reference-row a:hover {
  border-color: #315f72;
  color: #ffffff;
  background: #315f72;
}

.workflow-sequence,
.workflow-checklist {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) minmax(0, 0.72fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.workflow-sequence ol,
.workflow-checklist ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: var(--slate);
  line-height: 1.5;
}

.workflow-sequence li::marker {
  color: #315f72;
  font-weight: 900;
}

.workflow-checklist li::marker {
  color: #4d765e;
}

.workflow-sources {
  padding: 14px;
  border-top: 1px solid rgba(53, 105, 129, 0.25);
  border-bottom: 1px solid rgba(53, 105, 129, 0.25);
  background: #f7fafb;
}

.formula-box {
  padding: 14px 16px;
  border-left: 4px solid var(--coral);
  border-radius: var(--radius);
  background: #fff7f4;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.qa-callout {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(211, 155, 42, 0.36);
  border-radius: var(--radius);
  background: #fff8e8;
}

.qa-callout strong {
  color: #7a5510;
}

.reference-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 10px 0 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.reference-entry {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(111, 82, 52, 0.14);
  border-radius: 8px;
  background: rgba(247, 240, 229, 0.42);
}

.reference-entry small {
  min-width: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.reference-strip__title {
  margin: 0 0 1px 2px;
  color: #7b6b58;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.reference-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid rgba(111, 82, 52, 0.18);
  border-radius: 6px;
  color: #6d5a45;
  background: rgba(247, 240, 229, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.reference-chip:hover {
  border-color: rgba(111, 82, 52, 0.32);
  background: #efe3d2;
  color: #4f3e2d;
}

@media (max-width: 720px) {
  .reference-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .reference-chip {
    width: fit-content;
  }
}

.references-list {
  display: grid;
  gap: 12px;
}

.reference-group {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
}

.reference-group h3 {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 0.96rem;
}

.reference-items {
  display: grid;
  gap: 8px;
}

.reference-item {
  padding: 9px 10px;
  border-left: 3px solid rgba(111, 82, 52, 0.24);
  border-radius: 6px;
  background: rgba(248, 244, 238, 0.72);
}

.reference-item a {
  color: #5f4a34;
  font-weight: 800;
  text-decoration: none;
}

.reference-item a:hover {
  color: var(--teal-dark);
}

.reference-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.42;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.visual-panel {
  overflow: hidden;
}

.visual-panel-header {
  padding: 16px 16px 0;
}

.visual-panel-header p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.visual-large {
  height: 300px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  background: #f8fbfb;
}

.visual-svg,
.mini-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.layer-a {
  fill: #e6eff0;
}

.layer-b {
  fill: #cfe5dc;
}

.layer-c {
  fill: #f4d8c9;
}

.fault-fill {
  fill: rgba(216, 93, 73, 0.2);
  stroke: #d85d49;
  stroke-width: 2;
}

.reflector {
  fill: none;
  stroke: #30404d;
  stroke-width: 2.4;
}

.reflector.thin {
  stroke-width: 1.4;
  opacity: 0.72;
}

.wave-ring {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
  opacity: 0;
  animation: ring 3.4s infinite ease-out;
}

.wave-ring.delay-1 {
  animation-delay: 0.75s;
}

.wave-ring.delay-2 {
  animation-delay: 1.5s;
}

.ray {
  stroke: var(--coral);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 12 12;
  animation: dash 1.6s linear infinite;
}

.trace-path {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
}

.trace-path.alt {
  stroke: var(--coral);
}

.trace-path.fade {
  opacity: 0.36;
}

.scanline {
  stroke: var(--amber);
  stroke-width: 3;
  stroke-linecap: round;
  animation: scan 3.2s ease-in-out infinite;
}

.migrating-dot {
  fill: var(--coral);
  animation: drift 4s ease-in-out infinite;
}

.qa-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(360px, 1.14fr);
  gap: 16px;
}

.qa-composer,
.answer-panel {
  padding: 16px;
}

.qa-composer textarea,
.chat-form textarea {
  display: block;
  min-height: 150px;
  padding: 14px;
  resize: vertical;
  line-height: 1.5;
}

.composer-actions {
  display: flex;
  gap: 10px;
  margin: 12px 0 16px;
}

.answer-panel {
  min-height: 360px;
}

.answer-panel h3,
.chat-message strong {
  color: var(--teal-dark);
}

.answer-panel p,
.answer-panel li {
  color: var(--slate);
  line-height: 1.62;
}

.related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chat-shell {
  display: grid;
  grid-template-rows: minmax(380px, 58vh) auto;
  overflow: hidden;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.84)),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(12, 124, 120, 0.08) 29px 30px);
}

.chat-message {
  max-width: min(760px, 92%);
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  line-height: 1.58;
  white-space: pre-wrap;
}

.chat-message.user {
  align-self: flex-end;
  border-color: rgba(12, 124, 120, 0.28);
  background: #edf6f5;
}

.chat-message.system {
  border-color: rgba(211, 155, 42, 0.36);
  background: #fff8e8;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.chat-form textarea {
  min-height: 68px;
  max-height: 180px;
}

.icon-button.send {
  width: 56px;
  height: 68px;
  min-width: 56px;
  align-self: end;
}

.feedback-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(300px, 0.9fr);
  gap: 16px;
}

.feedback-panel {
  padding: 18px;
}

.field-stack {
  display: grid;
  gap: 8px;
  color: var(--slate);
  font-weight: 700;
}

.field-stack input,
.field-stack textarea {
  padding: 12px 14px;
  font-weight: 500;
  line-height: 1.5;
}

.field-stack textarea {
  min-height: 210px;
  resize: vertical;
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.feedback-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.release-panel h3 {
  margin-bottom: 12px;
  color: var(--teal-dark);
}

.release-panel ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--slate);
  line-height: 1.58;
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}


/* SeismoLex polish pass */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 249, 239, 0.8) 0%, rgba(235, 224, 207, 0.42) 48%, rgba(190, 154, 112, 0.34) 100%),
    repeating-linear-gradient(172deg, rgba(64, 91, 92, 0.08) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(184deg, transparent 0 56px, rgba(139, 99, 61, 0.1) 56px 58px, transparent 58px 112px),
    linear-gradient(145deg, #f3eadc 0%, #e0c9aa 54%, #c79c6c 100%);
}

.sidebar,
.subgroup-nav,
.detail-panel,
.answer-panel,
.qa-composer,
.chat-shell,
.visual-panel,
.feedback-panel {
  border-color: rgba(122, 96, 65, 0.34);
  background: rgba(255, 250, 242, 0.9);
}

.brand-mark {
  background: linear-gradient(135deg, #e4f0ee, #fff6e8);
}

.section-heading p,
.english,
.term-card p {
  color: #4f5f66;
}

.subgroup-nav {
  background: rgba(255, 247, 235, 0.76);
}

.subgroup-filter {
  border-color: var(--subgroup-border, rgba(12, 124, 120, 0.32));
  color: var(--subgroup-text, #236c68);
  background: var(--subgroup-bg, #edf6f4);
}

.subgroup-filter:hover,
.subgroup-filter.active {
  border-color: var(--subgroup-border-active, rgba(12, 124, 120, 0.82));
  color: var(--subgroup-text-active, #063f3d);
  background: var(--subgroup-bg-active, #cfe9e6);
  box-shadow: inset 0 0 0 1px var(--subgroup-border, rgba(12, 124, 120, 0.16));
}

.subgroup-filter.active small {
  color: var(--subgroup-text-active, #063f3d);
  background: var(--subgroup-count-bg-active, #a9d8d2);
}

.term-card {
  border-color: rgba(150, 123, 88, 0.42);
  background: #fffaf2;
}

.term-card:hover {
  border-color: rgba(12, 124, 120, 0.46);
  background: #fff6e8;
}

.term-card.active {
  border-color: rgba(12, 124, 120, 0.95);
  background: linear-gradient(90deg, rgba(12, 124, 120, 0.18) 0%, #f4f4e8 42%, #fffaf2 100%);
  box-shadow: 0 16px 34px rgba(12, 124, 120, 0.18), inset 4px 0 0 var(--teal);
}

.term-card.active:hover {
  border-color: var(--teal-dark);
  background: linear-gradient(90deg, rgba(12, 124, 120, 0.23) 0%, #edf2e5 44%, #fff5e6 100%);
}

.term-card.active h3 {
  color: var(--teal-dark);
}

.term-card.active .english {
  color: #315f5d;
}

.term-card.active .category-tag {
  color: #075956;
  background: #dcefeb;
}

.term-card.active .group-tag {
  color: #8b392e;
  background: #ffe5df;
}

.term-subgroup-heading,
.subgroup-empty {
  border-color: rgba(47, 139, 134, 0.28);
  background: rgba(231, 242, 239, 0.82);
}

.site-footer {
  margin-top: 28px;
  padding: 18px 2px 4px;
  border-top: 1px solid rgba(122, 96, 65, 0.34);
  color: #5a6870;
  font-size: 0.84rem;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(73, 124, 69, 0);
  }
}

@keyframes dailyPulse {
  0% {
    opacity: 0.72;
    transform: scale(0.72);
  }
  70% {
    opacity: 0;
    transform: scale(1.45);
  }
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes ring {
  0% {
    r: 4;
    opacity: 0.72;
  }
  80% {
    r: 112;
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: -24;
  }
}

@keyframes scan {
  0%,
  100% {
    transform: translateX(-90px);
  }
  50% {
    transform: translateX(90px);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(34px, -24px);
  }
}




.daily-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10, 18, 24, 0.28);
  backdrop-filter: blur(2px);
}

.daily-drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 70;
  display: flex;
  width: min(620px, calc(100vw - 24px));
  flex-direction: column;
  padding: 16px;
  border: 1px solid rgba(150, 123, 88, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98) 0%, rgba(249, 241, 229, 0.98) 100%);
  box-shadow: 0 26px 70px rgba(18, 31, 39, 0.28);
  transform: translateX(calc(100% + 28px));
  transition: transform 180ms ease;
  overflow: hidden;
}

body.daily-drawer-open {
  overflow: hidden;
}

body.daily-drawer-open .daily-drawer,
.daily-drawer.open {
  transform: translateX(0) !important;
}

.daily-drawer[aria-hidden="true"] {
  pointer-events: none;
}

.daily-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(150, 123, 88, 0.2);
}

.daily-drawer-kicker {
  display: inline-flex;
  margin-bottom: 5px;
  color: #5a3c02;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.daily-drawer-header h2 {
  color: #101820;
  font-size: 1.25rem;
}

.daily-drawer-close {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(150, 123, 88, 0.34);
  border-radius: var(--radius);
  color: #273941;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
}

.daily-drawer-close:hover {
  border-color: rgba(213, 155, 42, 0.56);
  background: #fff0c8;
}

.daily-drawer-content {
  flex: 1;
  margin: 14px 0 0;
  overflow-y: auto;
  padding-right: 4px;
}

.daily-drawer .daily-spotlight {
  grid-template-columns: 1fr;
  gap: 14px;
}

.daily-drawer .daily-card {
  min-height: 0;
}

.daily-drawer .daily-quiz {
  grid-column: auto;
  max-height: none;
}


.daily-panel-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.daily-panel-letter {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 88px;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(126, 100, 68, 0.36);
  border-radius: 9px;
  color: #3f2a02;
  background: linear-gradient(180deg, #fffefa 0%, #fff8ec 100%);
  box-shadow: 0 12px 24px rgba(86, 62, 30, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  text-align: left;
  white-space: normal;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.daily-panel-letter::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(30deg, transparent 49%, rgba(126, 100, 68, 0.28) 50%, transparent 51%) left center / 50% 100% no-repeat,
    linear-gradient(-30deg, transparent 49%, rgba(126, 100, 68, 0.28) 50%, transparent 51%) right center / 50% 100% no-repeat,
    linear-gradient(180deg, transparent 0 46%, rgba(126, 100, 68, 0.14) 46% 47%, transparent 47%);
  content: "";
  pointer-events: none;
}

.daily-panel-letter::after {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 42px;
  height: 13px;
  border: 1px solid rgba(126, 100, 68, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  content: "";
  pointer-events: none;
}

.daily-panel-letter:hover,
.daily-panel-letter.active {
  border-color: rgba(126, 100, 68, 0.62);
  background: linear-gradient(180deg, #fff8e8 0%, #ffffff 100%);
  box-shadow: 0 18px 34px rgba(86, 62, 30, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transform: translateY(-2px);
}

.daily-panel-letter[data-daily-panel="question"] .daily-drawer-toggle-mark {
  background: #be6879;
  box-shadow: 0 0 0 5px rgba(190, 104, 121, 0.14);
}

.daily-panel-letter[data-daily-panel="quiz"] .daily-drawer-toggle-mark {
  background: #0c7c78;
  box-shadow: 0 0 0 5px rgba(12, 124, 120, 0.14);
}

.daily-panel-letter .daily-drawer-toggle-mark,
.daily-panel-letter .daily-drawer-toggle-copy {
  position: relative;
  z-index: 1;
}

.daily-panel-letter .daily-drawer-toggle-count {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.daily-panel {
  display: none;
}

.daily-panel.active {
  display: block;
}

.daily-panel .daily-card {
  min-height: 260px;
}

.daily-panel .daily-card p {
  font-size: 0.94rem;
}

.daily-detail-slot {
  margin-top: 12px;
}

.daily-inline-detail {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(150, 123, 88, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 252, 246, 0.9);
  box-shadow: 0 12px 28px rgba(86, 62, 30, 0.1);
}

.daily-inline-detail-head span,
.daily-related-question span {
  display: inline-flex;
  margin-bottom: 5px;
  color: #6f4f08;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.daily-inline-detail-head h3 {
  margin: 0 0 4px;
  color: #101820;
  font-size: 1.05rem;
}

.daily-inline-detail-head p {
  margin: 0;
  color: #5c6871;
  font-size: 0.82rem;
  font-weight: 700;
}

.daily-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.daily-note-grid section,
.daily-related-question {
  padding: 12px;
  border: 1px solid rgba(150, 123, 88, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.daily-note-grid h4,
.daily-related-question h4 {
  margin: 0 0 6px;
  color: #17262d;
  font-size: 0.86rem;
}

.daily-note-grid p,
.daily-related-question p {
  margin: 0;
  color: #30404d;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
}

/* Daily spotlight and contact */
.daily-spotlight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  margin: -2px 0 14px;
}

.daily-card {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  padding: 14px;
  border: 1px solid rgba(150, 123, 88, 0.42);
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(24, 33, 44, 0.09);
}

.daily-term-card {
  border-color: rgba(77, 116, 184, 0.34);
  background:
    linear-gradient(135deg, rgba(234, 242, 255, 0.96) 0%, rgba(244, 249, 255, 0.94) 58%, rgba(251, 253, 255, 0.92) 100%);
}

.daily-question-card {
  border-color: rgba(190, 104, 121, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 239, 243, 0.96) 0%, rgba(255, 247, 247, 0.94) 58%, rgba(255, 252, 249, 0.92) 100%);
}

.daily-label {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.daily-term-card .daily-label {
  color: #173d70;
  background: rgba(77, 116, 184, 0.14);
}

.daily-question-card .daily-label {
  color: #6f2c3d;
  background: rgba(190, 104, 121, 0.15);
}

.daily-card h3 {
  margin-bottom: 8px;
  color: #101820;
  font-size: 1rem;
  font-weight: 800;
}

.daily-card p {
  margin-bottom: 12px;
  color: #24343c;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.48;
}

.daily-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.daily-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #143e73;
  background: #dfeaff;
  font-size: 0.72rem;
  font-weight: 800;
}

.daily-action {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(12, 124, 120, 0.34);
  border-radius: var(--radius);
  color: var(--teal-dark);
  background: #edf6f5;
  font-size: 0.86rem;
  font-weight: 800;
}

.daily-term-card .daily-action {
  border-color: rgba(77, 116, 184, 0.38);
  color: #254f89;
  background: #e0ebff;
}

.daily-question-card .daily-action {
  border-color: rgba(190, 104, 121, 0.34);
  color: #844052;
  background: #ffe3ea;
}

.daily-action:hover {
  border-color: rgba(77, 116, 184, 0.72);
  background: #cfddfb;
}

.daily-question-card .daily-action:hover {
  border-color: rgba(190, 104, 121, 0.64);
  background: #ffd5df;
}

.contact-layout {
  display: grid;
  max-width: 720px;
}

.contact-panel {
  padding: 24px;
}

.contact-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-panel h3 {
  margin-bottom: 6px;
  font-size: 1.45rem;
}

.contact-panel p {
  margin-bottom: 16px;
  color: var(--muted);
}

.contact-panel a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(12, 124, 120, 0.34);
  border-radius: var(--radius);
  color: var(--teal-dark);
  background: #edf6f5;
  font-weight: 800;
  text-decoration: none;
}

.contact-panel a:hover {
  border-color: rgba(12, 124, 120, 0.82);
  background: #cfe9e6;
}

/* Dark sidebar navigation */
.sidebar {
  gap: 22px;
  border-right-color: rgba(213, 232, 229, 0.18);
  background:
    linear-gradient(180deg, rgba(28, 45, 54, 0.98) 0%, rgba(18, 31, 39, 0.98) 54%, rgba(12, 21, 27, 0.98) 100%);
  color: #eef7f6;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.sidebar .brand {
  color: #f8fffd;
}

.sidebar .brand strong {
  font-size: 0.98rem;
}

.sidebar .brand small {
  font-size: 0.72rem;
}

.sidebar .brand small {
  color: #aebfc2;
}

.sidebar .brand-mark {
  border-color: rgba(118, 211, 199, 0.38);
  background: linear-gradient(135deg, #102b32, #1e3d45);
}

.sidebar .nav-tab {
  min-height: 39px;
  padding: 7px 9px;
  border-color: rgba(214, 231, 228, 0.08);
  color: #c7d7da;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.88rem;
}

.sidebar .nav-tab:hover,
.sidebar .nav-tab.active {
  border-color: rgba(116, 214, 202, 0.48);
  color: #ffffff;
  background: rgba(12, 124, 120, 0.28);
}

.sidebar-meter {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: auto;
  flex-shrink: 0;
}

.sidebar-meter > div {
  border-color: rgba(213, 232, 229, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-meter strong {
  color: #ffffff;
  font-size: 1.28rem;
}

.sidebar-meter span {
  color: #b8c9cc;
  font-size: 0.74rem;
}

.sidebar-group-links {
  display: grid;
  gap: 8px;
}

.sidebar-group-link[data-sidebar-group="Seismic Acquisition"] {
  --group-main: #0c7c78;
  --group-main-dark: #075956;
  --group-main-soft: #dff2ef;
  --group-main-ring: rgba(12, 124, 120, 0.42);
}

.sidebar-group-link[data-sidebar-group="Seismic Processing"] {
  --group-main: #a76517;
  --group-main-dark: #74450d;
  --group-main-soft: #f8e4bf;
  --group-main-ring: rgba(167, 101, 23, 0.42);
}

.sidebar-group-link[data-sidebar-group="Seismic Interpretation"] {
  --group-main: #7a4264;
  --group-main-dark: #56304a;
  --group-main-soft: #f1ddea;
  --group-main-ring: rgba(122, 66, 100, 0.42);
}

.sidebar-group-link[data-sidebar-group="Seismic Attributes"] {
  --group-main: #a7c6cc;
  --group-main-dark: #668d98;
  --group-main-soft: #e8f1f2;
  --group-main-ring: rgba(102, 141, 152, 0.42);
  color: #173e49;
}

.sidebar-group-link {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--group-main-ring, rgba(213, 232, 229, 0.14));
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--group-main, rgba(255, 255, 255, 0.04));
  text-align: left;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.sidebar-group-link:hover,
.sidebar-group-link.active {
  border-color: var(--group-main-dark, rgba(116, 214, 202, 0.56));
  color: #ffffff;
  background: var(--group-main-dark, rgba(12, 124, 120, 0.32));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.sidebar::-webkit-scrollbar,
.daily-quiz::-webkit-scrollbar,
.daily-quiz-feedback::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb,
.daily-quiz::-webkit-scrollbar-thumb,
.daily-quiz-feedback::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(213, 155, 42, 0.46);
}

.sidebar::-webkit-scrollbar-track,
.daily-quiz::-webkit-scrollbar-track,
.daily-quiz-feedback::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}


.daily-quiz {
  display: grid;
  grid-column: 1 / -1;
  max-height: 340px;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 7px;
  padding: 12px;
  overflow-y: auto;
  border-color: rgba(213, 155, 42, 0.46);
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.98) 0%, rgba(239, 247, 237, 0.94) 56%, rgba(238, 250, 248, 0.94) 100%);
}

.daily-quiz-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.daily-quiz-label {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #5a3c02;
  background: rgba(213, 155, 42, 0.14);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.daily-quiz-meta {
  color: #513903;
  font-size: 0.72rem;
  font-weight: 700;
}

.daily-quiz-top strong {
  display: block;
  margin-top: 2px;
  color: #101820;
  font-size: 1.02rem;
  font-weight: 800;
}

.daily-quiz-score {
  min-width: 42px;
  padding: 4px 7px;
  border: 1px solid rgba(213, 155, 42, 0.34);
  border-radius: 999px;
  color: #553901;
  background: rgba(213, 155, 42, 0.14);
  text-align: center;
  font-size: 0.74rem;
}

.daily-quiz-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
}

.daily-quiz-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d39b2a, #74d6ca);
}

.daily-quiz h3 {
  margin: 0;
  color: #101820;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
}

.daily-quiz-clue {
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid rgba(12, 124, 120, 0.58);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #253940;
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  line-height: 1.5;
}

.daily-quiz-kind {
  width: max-content;
  padding: 3px 7px;
  border: 1px solid rgba(12, 124, 120, 0.24);
  border-radius: 999px;
  color: #0b6461;
  background: rgba(12, 124, 120, 0.08);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.daily-quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.daily-quiz-option {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: flex-start;
  padding: 7px 9px;
  border: 1px solid rgba(150, 123, 88, 0.22);
  border-radius: var(--radius);
  color: #17262d;
  background: rgba(255, 255, 255, 0.7);
  text-align: left;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.36;
}

.daily-quiz-option strong,
.daily-quiz-option span {
  display: block;
}

.daily-quiz-option strong {
  color: #183239;
  font-size: 0.78rem;
}

.daily-quiz-option span {
  color: #4a5e64;
  font-size: 0.72rem;
  line-height: 1.42;
}

.daily-quiz-option:hover span,
.daily-quiz-option.correct span,
.daily-quiz-option.wrong span {
  color: inherit;
}

.daily-quiz-option:hover {
  border-color: rgba(106, 72, 5, 0.72);
  color: #ffffff;
  background: #7a5207;
  box-shadow: 0 8px 20px rgba(83, 57, 3, 0.18);
}

.daily-quiz-option:focus-visible {
  outline: 3px solid rgba(12, 124, 120, 0.42);
  outline-offset: 2px;
  border-color: #0c7c78;
  color: #ffffff;
  background: #0b5f5c;
}

.daily-quiz-option:disabled {
  cursor: default;
  opacity: 1;
}

.daily-quiz-option.correct {
  border-color: #08736f;
  color: #ffffff;
  background: #0b6f6b;
}

.daily-quiz-option.wrong {
  border-color: #9c3326;
  color: #ffffff;
  background: #b74231;
}

.daily-quiz-feedback {
  min-height: 70px;
  margin: 0;
  padding: 8px;
  overflow: visible;
  border-radius: var(--radius);
  color: #3d4e55;
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  line-height: 1.42;
}

.daily-quiz-feedback.correct {
  border: 1px solid rgba(116, 214, 202, 0.34);
}

.daily-quiz-feedback.wrong {
  border: 1px solid rgba(216, 93, 73, 0.36);
}

.daily-quiz-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  margin-top: 2px;
}

.daily-quiz-actions button {
  width: 100%;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(213, 155, 42, 0.26);
  border-radius: var(--radius);
  color: #6f4f08;
  background: rgba(255, 248, 232, 0.86);
  font-size: 0.72rem;
}

.daily-quiz-actions button[data-quiz-term] {
  grid-column: 1 / -1;
  min-height: 30px;
}

.daily-quiz-actions button:hover:not(:disabled) {
  border-color: rgba(240, 213, 154, 0.62);
  color: #ffffff;
  background: rgba(213, 155, 42, 0.18);
}

.daily-quiz-actions button:disabled {
  color: rgba(220, 235, 234, 0.42);
}

.daily-quiz-actions button[data-quiz-prev],
.daily-quiz-actions button[data-quiz-next],
.daily-quiz-actions button[data-quiz-term] {
  border-color: rgba(9, 79, 91, 0.5);
  color: #ffffff;
  background: #0f6371;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(9, 79, 91, 0.16);
}

.daily-quiz-actions button[data-quiz-prev]:hover:not(:disabled),
.daily-quiz-actions button[data-quiz-next]:hover:not(:disabled),
.daily-quiz-actions button[data-quiz-term]:hover:not(:disabled) {
  border-color: #073f4a;
  color: #ffffff;
  background: #094a56;
  transform: translateY(-1px);
}

.daily-quiz-actions button[data-quiz-prev]:focus-visible,
.daily-quiz-actions button[data-quiz-next]:focus-visible,
.daily-quiz-actions button[data-quiz-term]:focus-visible {
  outline: 3px solid rgba(9, 79, 91, 0.35);
  outline-offset: 2px;
}

.daily-quiz-actions button[data-quiz-prev]:disabled,
.daily-quiz-actions button[data-quiz-next]:disabled,
.daily-quiz-actions button[data-quiz-term]:disabled {
  border-color: rgba(71, 91, 95, 0.24);
  color: rgba(38, 55, 60, 0.62);
  background: rgba(225, 232, 232, 0.86);
  box-shadow: none;
}


@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .sidebar-meter {
    display: none;
  }

  .glossary-grid,
  .qa-layout,
  .feedback-layout {
    grid-template-columns: 1fr;
  }

  .daily-spotlight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .term-list {
    max-height: none;
  }

  .term-tags {
    max-width: 58%;
  }

  .workflow-stages {
    grid-template-columns: 1fr;
  }

  .workflow-stage-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .workflow-ai-guide > header,
  .workflow-ai-result-heading {
    display: grid;
  }

  .workflow-ai-guide form,
  .workflow-ai-match-grid,
  .workflow-ai-evidence-grid,
  .workflow-indicator-grid,
  .workflow-evidence-target-grid {
    grid-template-columns: 1fr;
  }

  .workflow-indicator-section > header {
    display: grid;
  }

  .workflow-evidence-target-section > header {
    display: grid;
  }

  .workflow-ai-boundary {
    justify-self: start;
  }

  .workspace {
    padding: 18px 14px 28px;
  }

  .topbar {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .daily-home-letters {
    grid-template-columns: 1fr;
  }

  .daily-drawer-toggle {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .api-pill {
    white-space: normal;
  }

  .nav-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .toolbar select {
    grid-column: 1 / -1;
  }

  .group-filter {
    width: 100%;
  }

  .group-nav {
    grid-template-columns: 1fr;
  }

  .attribute-workspace-header,
  .workflow-objective-control,
  .workflow-objective-header,
  .workflow-evidence-principle,
  .workflow-prerequisites,
  .workflow-sequence,
  .workflow-checklist {
    grid-template-columns: 1fr;
  }

  .attribute-mode-switch {
    min-width: 0;
    width: 100%;
  }

  .workflow-stage-overview {
    grid-template-columns: 1fr;
  }

  .workflow-objective-header aside {
    padding-top: 12px;
    padding-left: 0;
    border-top: 3px solid #c65b4b;
    border-left: 0;
  }

  .workflow-stage-items {
    grid-template-columns: 1fr;
  }

  .term-card-top,
  .term-group-heading,
  .term-subgroup-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .term-tags {
    justify-content: flex-start;
    max-width: 100%;
  }

  .detail-hero,
  .info-grid,
  .attribute-core-grid,
  .attribute-context-grid,
  .visual-grid,
  .feedback-grid,
  .daily-spotlight,
  .daily-drawer .daily-spotlight,
  .daily-panel-switcher,
  .daily-note-grid,
  .daily-quiz-options {
    grid-template-columns: 1fr;
  }

  .daily-drawer {
    top: 8px;
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
    padding: 14px;
  }

  .detail-panel {
    min-height: auto;
  }

  .daily-card {
    min-height: auto;
  }

  .mini-visual {
    min-height: 210px;
  }

  .visual-large {
    height: 250px;
  }
}


/* Search result location navigation */
.term-card-select {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.term-card-title-action {
  flex: 1 1 auto;
}

.term-card-body-action {
  display: grid;
  gap: 10px;
}

.term-card-select:focus-visible {
  outline: 2px solid rgba(12, 124, 120, 0.56);
  outline-offset: 4px;
  border-radius: 8px;
}

.result-location-tags {
  align-items: flex-start;
}

.location-tag {
  border: 1px solid transparent;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.location-tag:hover,
.location-tag:focus-visible {
  border-color: rgba(12, 124, 120, 0.42);
  box-shadow: 0 6px 16px rgba(12, 124, 120, 0.12);
  transform: translateY(-1px);
  outline: none;
}


/* Search result card semantic title/definition */
.term-card-heading {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.2;
}

.term-card-definition {
  display: block;
  margin: 0;
  color: var(--slate);
  line-height: 1.5;
}

.term-card.active .term-card-heading {
  color: var(--teal-dark);
}


/* Search result navigation scroll target */
.group-nav {
  scroll-margin-top: 18px;
}

.subgroup-filter.active {
  scroll-margin-inline: 18px;
}


/* Clickable keyword filters */
.keyword-chip {
  border-color: rgba(12, 124, 120, 0.34);
  color: #173f3d;
  background: #dfeeea;
  font-weight: 850;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.keyword-chip:hover,
.keyword-chip:focus-visible {
  border-color: rgba(12, 124, 120, 0.72);
  color: #063f3d;
  background: #c3e2dc;
  box-shadow: 0 7px 18px rgba(12, 124, 120, 0.16);
  outline: none;
  transform: translateY(-1px);
}

.keyword-chip.active {
  border-color: rgba(12, 124, 120, 0.9);
  color: #ffffff;
  background: #0c7c78;
  box-shadow: 0 8px 20px rgba(12, 124, 120, 0.22);
}

.detail-keyword-row {
  margin: 0;
}

.seismo-tectonic-shell {
  display: grid;
  gap: 16px;
}

.seismo-tectonic-control-panel,
.seismo-tectonic-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(24, 33, 44, 0.07);
}

.seismo-tectonic-control-panel {
  display: grid;
  grid-template-columns: minmax(230px, 0.35fr) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.seismo-tectonic-intro {
  display: grid;
  gap: 6px;
  align-content: start;
}

.seismo-tectonic-intro > span,
.seismo-status,
.seismo-card-block h4 {
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seismo-tectonic-intro h3 {
  margin: 0;
  color: var(--heading-main);
  font-size: clamp(1.02rem, 1.45vw, 1.34rem);
}

.seismo-tectonic-intro p,
.seismo-card-block p,
.seismo-card-block li {
  margin: 0;
  color: var(--slate);
  line-height: 1.62;
}

.seismo-build-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.seismo-build-steps span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 250, 242, 0.82);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
  white-space: nowrap;
}

.seismo-build-steps span.active {
  border-color: rgba(211, 155, 42, 0.46);
  color: #7a5510;
  background: #fff8e8;
}

.seismo-build-steps span.complete {
  border-color: rgba(12, 124, 120, 0.28);
  color: var(--teal-dark);
  background: #edf6f5;
}

.seismo-selector-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.88fr) minmax(160px, 0.56fr);
  gap: 10px;
  align-items: end;
  align-content: start;
}

.seismo-region-stack {
  grid-column: 1;
  grid-row: 1;
}

.seismo-data-stack {
  grid-column: 2;
  grid-row: 1;
}

.seismo-selector-grid .field-stack {
  gap: 6px;
  font-size: 0.86rem;
  min-width: 0;
}

.seismo-selector-grid select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(255, 253, 248, 0.9);
  font: inherit;
}

.seismo-selected-value {
  display: block;
  min-height: 18px;
  color: #315066;
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1.26;
  overflow-wrap: anywhere;
}

.seismo-selector-grid select:disabled {
  color: var(--muted);
  background: #f3f5f4;
  cursor: not-allowed;
}

.seismo-period-stack {
  grid-column: 1 / -1;
  grid-row: 2;
  gap: 8px;
}

.seismo-period-stack small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.32;
}

.seismo-period-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.seismo-period-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--slate);
  background: rgba(255, 250, 242, 0.84);
  cursor: pointer;
}

.seismo-period-chip input {
  grid-row: span 2;
  accent-color: var(--teal-dark);
}

.seismo-period-chip span {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 850;
}

.seismo-period-chip small {
  color: var(--muted);
  font-size: 0.68rem;
}

.seismo-period-chip.selected {
  border-color: rgba(12, 124, 120, 0.36);
  background: #edf6f5;
  box-shadow: 0 8px 20px rgba(12, 124, 120, 0.1);
}

.seismo-period-chip.disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.seismo-reset-button {
  justify-content: center;
  width: 100%;
  margin: 0;
}

.seismo-card-actions {
  display: grid;
  grid-column: 3;
  grid-row: 1;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (max-width: 1180px) {
  .seismo-selector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seismo-period-stack {
    grid-column: span 2;
    grid-row: auto;
  }

  .seismo-card-actions {
    grid-column: span 2;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .seismo-selector-grid {
    grid-template-columns: 1fr;
  }

  .seismo-period-stack {
    grid-column: auto;
  }

  .seismo-region-stack,
  .seismo-data-stack,
  .seismo-card-actions {
    grid-column: auto;
    grid-row: auto;
  }
}

.seismo-print-button {
  justify-content: center;
  width: 100%;
  margin: 0;
}

.seismo-tectonic-card {
  overflow: hidden;
}

.seismo-tectonic-card.blank {
  border-color: rgba(12, 124, 120, 0.18);
}

.seismo-tectonic-card.building {
  border-color: rgba(12, 124, 120, 0.28);
}

.seismo-tectonic-card.pending {
  border-color: rgba(211, 155, 42, 0.34);
}

.seismo-card-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.28fr);
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff, #edf6f5);
}

.seismo-tectonic-card.pending .seismo-card-hero {
  background: linear-gradient(135deg, #ffffff, #fff8e8);
}

.seismo-tectonic-card.blank .seismo-card-hero {
  background: linear-gradient(135deg, #ffffff, #f8fbfb);
}

.seismo-tectonic-card.building .seismo-card-hero {
  background: linear-gradient(135deg, #ffffff, #edf6f5);
}

.seismo-card-hero h3 {
  margin: 6px 0 4px;
  color: var(--heading-main);
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
}

.seismo-card-hero p {
  margin: 0;
  color: var(--muted);
}

.seismo-card-hero aside {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(12, 124, 120, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.seismo-card-hero aside strong {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seismo-card-hero aside span {
  color: var(--teal-dark);
  font-weight: 850;
}

.seismo-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 12px;
  padding: 18px;
}

.seismo-card-block {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.seismo-card-block.wide {
  grid-column: 1 / -1;
}

.seismo-card-block h4 {
  margin: 0;
}

.seismo-card-block ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.seismo-sublist {
  margin-top: 6px;
}

.seismo-empty-value {
  display: flex;
  align-items: center;
  min-height: 38px;
  color: rgba(48, 64, 77, 0.38) !important;
  font-size: 1.08rem;
  letter-spacing: 0.12em;
}

.seismo-context,
.seismo-pending {
  color: var(--muted) !important;
  font-size: 0.92rem;
}

.seismo-pending {
  padding: 10px;
  border: 1px dashed rgba(211, 155, 42, 0.46);
  border-radius: var(--radius-sm);
  background: #fff8e8;
}

.seismo-reference-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seismo-reference-strip a,
.seismo-reference-strip span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid rgba(111, 82, 52, 0.18);
  border-radius: 999px;
  color: #5f4a34;
  background: rgba(247, 240, 229, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.seismo-reference-strip a:hover {
  border-color: rgba(12, 124, 120, 0.34);
  color: var(--teal-dark);
  background: #edf6f5;
}

.seismo-regime-table-wrap {
  overflow-x: auto;
}

.seismo-regime-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--slate);
  font-size: 0.86rem;
}

.seismo-regime-table th,
.seismo-regime-table td {
  padding: 8px 9px;
  border: 1px solid rgba(111, 82, 52, 0.18);
  vertical-align: top;
  text-align: left;
}

.seismo-regime-table th {
  color: var(--teal-dark);
  background: rgba(237, 246, 245, 0.74);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seismo-regime-table td strong,
.seismo-regime-table td span {
  display: block;
}

.seismo-regime-table td strong {
  color: #173f3d;
}

.seismo-regime-table td span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

@media (max-width: 900px) {
  .seismo-tectonic-control-panel,
  .seismo-card-hero,
  .seismo-card-grid {
    grid-template-columns: 1fr;
  }

  .seismo-build-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seismo-period-picker {
    grid-template-columns: 1fr;
  }

  .seismo-meta-strip {
    grid-template-columns: 1fr;
  }
}

/* Seismo Tectonic paper-card interaction */
.seismo-tectonic-shell {
  max-width: 1220px;
  margin: 0 auto;
}

.seismo-tectonic-control-panel {
  border-color: rgba(12, 124, 120, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.97), rgba(239, 247, 245, 0.9)),
    radial-gradient(circle at 12% 20%, rgba(211, 155, 42, 0.1), transparent 28%);
  box-shadow:
    0 12px 30px rgba(31, 52, 61, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.seismo-tectonic-intro p {
  max-width: 36ch;
  font-size: 0.86rem;
  line-height: 1.42;
}

.seismo-tectonic-card {
  position: relative;
  margin: 4px auto 0;
  width: min(100%, 210mm);
  max-width: 210mm;
  min-height: 297mm;
  box-sizing: border-box;
  border: 1px solid rgba(111, 82, 52, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(90deg, transparent 0 54px, rgba(216, 93, 73, 0.18) 55px 56px, transparent 57px),
    repeating-linear-gradient(0deg, #fffdf8 0 30px, rgba(34, 94, 132, 0.1) 31px 32px),
    #fffdf8;
  box-shadow:
    0 28px 70px rgba(35, 30, 21, 0.18),
    0 2px 0 rgba(255, 255, 255, 0.88) inset;
  overflow: hidden;
}

.seismo-tectonic-card::before {
  content: "";
  position: absolute;
  inset: 10px auto auto 50%;
  width: 126px;
  height: 22px;
  border-radius: 999px;
  background: rgba(93, 78, 57, 0.14);
  box-shadow: 0 4px 14px rgba(35, 30, 21, 0.12);
  transform: translateX(-50%) rotate(-1.5deg);
  pointer-events: none;
}

.seismo-card-hero {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.24fr);
  padding: 34px 34px 22px 78px;
  border-bottom: 1px dashed rgba(111, 82, 52, 0.22);
  background: transparent !important;
}

.seismo-card-hero h3 {
  color: #173f3d;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.seismo-card-hero p {
  color: #315066;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: 1rem;
}

.seismo-card-hero aside {
  border-style: dashed;
  border-color: rgba(12, 124, 120, 0.24);
  background: rgba(255, 253, 248, 0.72);
}

.seismo-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 10px 18px;
  padding: 18px 34px 34px 78px;
  background: transparent;
}

.seismo-card-block {
  min-height: 112px;
  padding: 12px 14px 14px;
  border: 1px solid rgba(111, 82, 52, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 10px 24px rgba(84, 63, 42, 0.06);
}

.seismo-card-block.compact {
  min-height: 0;
  align-content: start;
  padding: 10px 12px 11px;
}

.seismo-card-block.compact .seismo-ink-line {
  font-size: 0.93rem;
  line-height: 1.42 !important;
}

.seismo-meta-block {
  gap: 10px;
}

.seismo-meta-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 2px;
}

.seismo-meta-item {
  display: flex;
  flex: 1 0 150px;
  gap: 8px;
  align-items: flex-start;
  min-height: 0;
  padding: 9px 10px;
  border: 1px dashed rgba(111, 82, 52, 0.22);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.58);
}

.seismo-meta-item > span {
  flex: 0 0 72px;
  color: rgba(95, 74, 52, 0.68);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.22;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.seismo-meta-item strong,
.seismo-meta-item p {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #1f5274;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: 0.92rem;
  line-height: 1.42;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.seismo-meta-item p {
  color: #315066;
}

.seismo-empty-inline {
  color: rgba(31, 82, 116, 0.36) !important;
}

.seismo-meta-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seismo-meta-notes span {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid rgba(12, 124, 120, 0.16);
  border-radius: 999px;
  color: #315066;
  background: rgba(237, 246, 245, 0.58);
  font-size: 0.74rem;
  line-height: 1.28;
}

.seismo-card-block h4 {
  color: rgba(95, 74, 52, 0.82);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.seismo-ink-line,
.seismo-ink-list li {
  color: #1f5274 !important;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: 1rem;
  font-weight: 560;
  line-height: 1.72 !important;
  letter-spacing: -0.01em;
  text-shadow: 0 0 0.01px rgba(31, 82, 116, 0.55);
  animation: seismoInkWrite 620ms steps(24, end) both;
}

.seismo-ink-list {
  gap: 7px !important;
  padding-left: 22px !important;
}

.seismo-ink-list li::marker {
  color: rgba(31, 82, 116, 0.62);
}

.seismo-card-block:nth-child(2n) .seismo-ink-line {
  animation-delay: 70ms;
}

.seismo-card-block:nth-child(3n) .seismo-ink-line {
  animation-delay: 130ms;
}

.seismo-empty-value {
  min-height: 34px;
  color: rgba(31, 82, 116, 0.28) !important;
  font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
  font-size: 1.3rem;
  letter-spacing: 0.16em;
}

.seismo-reference-strip a,
.seismo-reference-strip span {
  border-style: dashed;
  background: rgba(255, 253, 248, 0.68);
}

@keyframes seismoInkWrite {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateY(2px);
  }

  55% {
    opacity: 1;
  }

  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .seismo-ink-line,
  .seismo-ink-list li {
    animation: none;
  }
}

@page {
  size: A4 portrait;
  margin: 10mm;
}

@media print {
  html,
  body {
    width: 210mm;
    min-height: 297mm;
    background: #ffffff !important;
  }

  body.seismotectonic-active * {
    visibility: hidden;
  }

  body.seismotectonic-active #seismotectonic,
  body.seismotectonic-active #seismotectonic *,
  body.seismotectonic-active .seismo-tectonic-card,
  body.seismotectonic-active .seismo-tectonic-card * {
    visibility: visible;
  }

  body.seismotectonic-active .sidebar,
  body.seismotectonic-active .topbar,
  body.seismotectonic-active .section-heading,
  body.seismotectonic-active .seismo-tectonic-control-panel,
  body.seismotectonic-active .site-footer,
  body.seismotectonic-active .daily-drawer,
  body.seismotectonic-active .daily-drawer-backdrop {
    display: none !important;
  }

  body.seismotectonic-active .app-shell,
  body.seismotectonic-active .workspace,
  body.seismotectonic-active #seismotectonic,
  body.seismotectonic-active .seismo-tectonic-shell {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  body.seismotectonic-active .view {
    display: none !important;
  }

  body.seismotectonic-active #seismotectonic {
    display: block !important;
  }

  body.seismotectonic-active .seismo-tectonic-card {
    width: 190mm !important;
    max-width: 190mm !important;
    min-height: 277mm !important;
    margin: 0 auto !important;
    border: 0.35mm solid rgba(111, 82, 52, 0.38) !important;
    border-radius: 5mm !important;
    box-shadow: none !important;
    color: #1f5274 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.seismotectonic-active .seismo-tectonic-card::before {
    width: 34mm;
    height: 6mm;
    top: 3mm;
  }

  body.seismotectonic-active .seismo-card-hero {
    grid-template-columns: minmax(0, 1fr) 32mm !important;
    gap: 4mm !important;
    padding: 13mm 8mm 5mm 18mm !important;
  }

  body.seismotectonic-active .seismo-card-hero h3 {
    font-size: 18pt !important;
    line-height: 1.18 !important;
  }

  body.seismotectonic-active .seismo-card-hero p,
  body.seismotectonic-active .seismo-card-hero aside,
  body.seismotectonic-active .seismo-ink-line,
  body.seismotectonic-active .seismo-ink-list li {
    font-size: 8.5pt !important;
    line-height: 1.32 !important;
  }

  body.seismotectonic-active .seismo-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2.4mm 5mm !important;
    padding: 4mm 8mm 8mm 18mm !important;
  }

  body.seismotectonic-active .seismo-card-block {
    min-height: 0 !important;
    padding: 1.8mm 2mm 2.2mm !important;
    border: 0.25mm solid rgba(111, 82, 52, 0.34) !important;
    border-radius: 2.5mm !important;
    background: rgba(255, 255, 255, 0.82) !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.seismotectonic-active .seismo-card-block.compact {
    padding: 1.4mm 1.8mm !important;
  }

  body.seismotectonic-active .seismo-meta-strip {
    display: grid !important;
    grid-template-columns: 24mm 32mm minmax(0, 1fr) !important;
    gap: 1.5mm !important;
    overflow: visible !important;
  }

  body.seismotectonic-active .seismo-meta-item {
    flex: initial !important;
    min-height: 0 !important;
    padding: 1.2mm 1.4mm !important;
    border-radius: 2mm !important;
  }

  body.seismotectonic-active .seismo-meta-item > span {
    font-size: 5.8pt !important;
  }

  body.seismotectonic-active .seismo-meta-item strong,
  body.seismotectonic-active .seismo-meta-item p {
    font-size: 7.1pt !important;
    line-height: 1.22 !important;
  }

  body.seismotectonic-active .seismo-meta-notes {
    gap: 1.2mm !important;
  }

  body.seismotectonic-active .seismo-meta-notes span {
    padding: 0.8mm 1.4mm !important;
    font-size: 5.9pt !important;
  }

  body.seismotectonic-active .seismo-card-block h4 {
    font-size: 6.7pt !important;
    letter-spacing: 0.1em !important;
  }

  body.seismotectonic-active .seismo-ink-line,
  body.seismotectonic-active .seismo-ink-list li {
    animation: none !important;
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
  }

  body.seismotectonic-active .seismo-ink-list {
    gap: 1.2mm !important;
    padding-left: 4mm !important;
  }

  body.seismotectonic-active .seismo-reference-strip {
    gap: 1.5mm !important;
  }

  body.seismotectonic-active .seismo-reference-strip a,
  body.seismotectonic-active .seismo-reference-strip span {
    padding: 1.3mm 2mm !important;
    font-size: 6.6pt !important;
    text-decoration: none !important;
  }

  body.seismotectonic-active .seismo-regime-table {
    font-size: 6.4pt !important;
    line-height: 1.22 !important;
  }

  body.seismotectonic-active .seismo-regime-table th,
  body.seismotectonic-active .seismo-regime-table td {
    padding: 1.2mm !important;
  }
}
