/* Split dashboard — "Concept 2" look: flat white cards, hairline borders, one warm orange accent
   on a cream page. This file is the only stylesheet the dashboard loads.
   Class names, IDs and data attributes are unchanged, so scripts, tests and forms keep working. */

:root {
  color-scheme: light;
  /* Surfaces */
  --bg: #fbf7f2;
  --surface: #ffffff;
  --surface-2: #fdfaf6;
  --field: #ffffff;
  /* Text */
  --ink: #231f1a;
  --muted: #6b6356;
  --subtle: #7a7164;
  /* Accent: peach tint for fills, orange for marks, deep orange for text and buttons */
  --accent: #e8703f;
  --accent-deep: #b43c0a;
  --accent-ink: #8a2e08;
  --accent-soft: #fff1e6;
  --accent-edge: #fbd9bf;
  --btn: #c9480a;
  --btn-hover: #b43f07;
  /* Status */
  --good: #0f6e4d;
  --good-soft: #dff5ea;
  --warn: #7c4f06;
  --warn-soft: #fbeccb;
  --bad: #a52a38;
  --bad-soft: #fde3e6;
  /* Lines and depth */
  --line: #ece4d9;
  --line-strong: #ddd2c4;
  /* A light touch of neumorphism: each raised surface gets a soft warm shadow below-right and a
     white highlight above-left; fields and pressed buttons get the same pair turned inward. */
  --shadow-sm: 3px 3px 8px rgba(150, 118, 84, .13), -3px -3px 8px rgba(255, 255, 255, .9);
  --shadow: 7px 7px 18px rgba(150, 118, 84, .14), -7px -7px 16px rgba(255, 255, 255, .92);
  --inset: inset 2px 2px 5px rgba(150, 118, 84, .13), inset -2px -2px 5px rgba(255, 255, 255, .95);
  --shadow-pop: 0 24px 60px -20px rgba(74, 52, 30, .35);
  --ring: 0 0 0 3px rgba(232, 112, 63, .22);
  --r-lg: 18px;
  --r-md: 13px;
  --r-sm: 10px;
  font-family: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Page backdrop: a warm peach glow and a faint grid that fades out */
body::before, body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  background:
    radial-gradient(60vw 36vw at 88% -6%, #ffe7d4 0, transparent 70%),
    radial-gradient(42vw 30vw at -4% 0%, #fff1e2 0, transparent 70%),
    var(--bg);
}
body::after {
  background-image:
    linear-gradient(rgba(160, 120, 80, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 120, 80, .06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 55%);
  mask-image: linear-gradient(to bottom, #000, transparent 55%);
}
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(27px, 3.2vw, 36px); letter-spacing: -.03em; }
h2 { font-size: clamp(18px, 1.8vw, 21px); margin-bottom: 10px; }
h3 { font-size: 17px; margin-bottom: 8px; }
h4 { font-size: 15px; margin: 18px 0 8px; }
p { color: var(--muted); margin-bottom: 14px; }
small { display: block; color: var(--subtle); font-size: 12.5px; }
strong { font-weight: 600; }
a { color: var(--accent-deep); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre, textarea[readonly] { font-family: "SF Mono", ui-monospace, Consolas, Menlo, monospace; font-size: 13px; }
code { overflow-wrap: anywhere; padding: 2px 7px; border-radius: 6px; background: #f6f0e8; color: var(--ink); }
ol, ul { padding-left: 22px; }
li { margin: 8px 0; color: var(--muted); }
li strong, p strong { color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------- Buttons ---------- */
button { font: inherit; cursor: pointer; border: 0; touch-action: manipulation; }
button:disabled { opacity: .5; cursor: not-allowed; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px;
  border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  font-size: 14.5px; font-weight: 600; line-height: 1.2; text-align: center;
  color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.button:hover { text-decoration: none; background: var(--surface-2); border-color: #cdbfae; }
.button:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.button:active:not(:disabled):not(.dark):not(.create-action) { box-shadow: var(--inset); }
.button.dark, .button.create-action {
  color: #fff; border-color: var(--btn); background: var(--btn);
  box-shadow: 0 1px 2px rgba(180, 63, 7, .3), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.button.dark:hover, .button.create-action:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.button.compact { min-height: 36px; padding: 6px 14px; font-size: 13.5px; }
.text-button { padding: 6px 4px; background: none; color: var(--accent-deep); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Form fields ---------- */
label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
input, select, textarea { font: inherit; color: inherit; }
input:not([type=checkbox]), select, textarea {
  width: 100%; min-width: 0; min-height: 42px; padding: 9px 13px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--field); box-shadow: var(--inset); font-weight: 400;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; line-height: 1.5; overflow-wrap: anywhere; }
input::placeholder { color: #8d8478; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
select:disabled { opacity: .55; }
input:not([type=checkbox]):focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

/* ---------- Cards ---------- */
.report-panel, .run-panel, .experiment-card, .metric, .empty-experiments,
.login-panel, .directory-heading, .experiment-dialog, .heat-preview, .notice, .app-status {
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.report-panel, .run-panel { margin: 20px 0; padding: clamp(18px, 2.6vw, 28px); border-radius: var(--r-lg); }
.report-panel > :last-child, .run-panel > :last-child { margin-bottom: 0; }

details > summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details.report-panel > summary, .report-filters > summary { font-size: 17px; list-style: none; display: flex; align-items: center; gap: 12px; }
details.report-panel > summary::-webkit-details-marker, .report-filters > summary::-webkit-details-marker { display: none; }
details.report-panel > summary::before, .report-filters > summary::before {
  content: '+'; flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-2);
  color: var(--accent-deep); font-size: 18px; font-weight: 500; line-height: 1;
}
details.report-panel[open] > summary::before, .report-filters[open] > summary::before { content: '–'; background: var(--accent-soft); border-color: var(--accent-edge); }
details.report-panel[open] > summary { margin-bottom: 16px; }
.report-panel details, .run-panel details { margin: 16px 0; }
.report-panel details > summary:not(.button), .run-panel details > summary { font-size: 14.5px; color: var(--accent-deep); font-weight: 500; }
details form { margin-top: 16px; }

/* ---------- Page layout: side menu + content ---------- */
.studio.dashboard {
  display: grid; grid-template-columns: 276px minmax(0, 1fr); align-items: start; gap: 0 28px;
  width: min(96%, 1480px); margin: 0 auto;
}
.studio .content { width: auto; min-width: 0; margin: 16px 0; padding: clamp(14px, 2vw, 24px); border: 1px solid var(--line); border-radius: 22px; background: rgba(246, 241, 234, .72); box-shadow: var(--shadow-sm); }
.studio .content.narrow { max-width: 940px; }
.back-button { margin-top: 0; padding-left: 12px; }
.back-button svg { width: 16px; height: 16px; }
.page-heading { margin: 26px 0 6px; }
.page-heading h1 { margin-bottom: 10px; }

/* Look switch: a small two-way toggle */
.theme-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 4px; padding: 4px; border-radius: var(--r-sm); background: #f6f0e8; }
.theme-switch button {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 5px 4px; white-space: nowrap;
  border-radius: 8px; border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.2;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); border-color: var(--line); color: var(--accent-deep); box-shadow: var(--shadow-sm); }
.swatch { flex-shrink: 0; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .14); }
.swatch.glass { background: linear-gradient(135deg, #ffd9bd, #fff4e8); }
.swatch.simple { background: #ffffff; }

/* Side menu */
.side {
  position: sticky; top: 16px; z-index: 20; view-transition-name: side-menu;
  display: flex; flex-direction: column; gap: 0;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; margin: 16px 0; padding: 0;
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.side-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.brand:hover { text-decoration: none; }
.brand::before {
  content: ''; flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px;
  background: #ee7a2f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Crect x='7.5' y='8' width='4.5' height='12' rx='1.6' fill='white'/%3E%3Crect x='16' y='8' width='4.5' height='12' rx='1.6' fill='white' fill-opacity='.7'/%3E%3C/svg%3E") center / 100% no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(180, 63, 7, .25);
}
.brand-dot { color: var(--accent); margin-left: -8px; }
.store-name { padding: 3px 10px; border-radius: 999px; font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.side .create-action { width: calc(100% - 28px); margin: 14px 14px 4px; white-space: nowrap; }
.side-toggle {
  flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; margin-left: auto; padding: 8px;
  border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--muted); background: var(--surface);
  transition: background-color .15s ease, color .15s ease;
}
.side-toggle:hover { background: var(--surface-2); color: var(--ink); }
.side-toggle svg { width: 100%; height: 100%; }
.side-nav { padding: 6px 10px 14px; }
.side-nav h2 { margin: 16px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--subtle); overflow-wrap: anywhere; }
.side-nav h2:first-child { margin-top: 8px; }
.side-nav ul { list-style: none; display: grid; gap: 2px; margin: 0; padding: 0; }
.side-nav li { margin: 0; }
.side-nav a, .side-out {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; padding: 7px 10px;
  border-radius: var(--r-sm); border: 1px solid transparent; background: none;
  color: var(--ink); text-align: left; font-weight: 400;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.side-nav a:hover, .side-out:hover { text-decoration: none; background: var(--surface-2); }
.side-nav a[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent-edge); }
.side-nav a[aria-current="page"] strong { color: var(--accent-deep); font-weight: 600; }
.side-nav strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.25; }
.side-nav small { font-size: 12px; line-height: 1.3; margin-top: 1px; }
.side-note { margin: -2px 10px 8px; font-size: 12px; line-height: 1.3; color: var(--subtle); }
.side-icon { flex-shrink: 0; width: 20px; height: 20px; color: #7d7466; transition: color .15s ease; }
.side-nav a:hover .side-icon { color: var(--ink); }
.side-nav a[aria-current="page"] .side-icon { color: #d9560f; }
.side-hint { margin: 6px 10px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 13px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.side-nav form { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.side-out { font: inherit; cursor: pointer; }

/* ---------- Home: list of experiments ---------- */
.studio .directory { padding-top: 20px; }
.directory-heading {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 22px;
  padding: clamp(20px, 3.4vw, 34px); border-radius: var(--r-lg);
}
.directory-heading h1 { margin: 0 0 6px; }
.directory-heading p { margin: 0; max-width: 52ch; }
.directory-heading dl { display: flex; gap: 10px; margin: 0; }
.directory-heading dl div {
  display: flex; flex-direction: column-reverse; align-items: flex-start; min-width: 92px; padding: 11px 15px;
  border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line);
}
.directory-heading dt { font-size: 12.5px; color: var(--muted); }
.directory-heading dd { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.eyebrow { display: block; margin-bottom: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .09em; color: var(--accent-deep); }

.how-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; padding: 0; }
.how-steps li { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 15px 17px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(255, 255, 255, .7); font-size: 13.5px; }
.how-steps li b { flex-shrink: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); border: 1px solid var(--accent-edge); color: var(--accent-deep); font-size: 14px; }
.how-steps li strong { display: block; font-size: 14.5px; }

.experiment-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; margin: 18px 0; padding: 0; }
.experiment-grid li { min-width: 0; margin: 0; }
.experiment-card {
  display: flex; flex-direction: column; align-items: flex-start; height: 100%; padding: 22px;
  border-radius: var(--r-lg); color: var(--ink); font-weight: 400; overflow-wrap: anywhere;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.experiment-card:hover, .experiment-card:focus-visible { text-decoration: none; transform: translateY(-2px); border-color: #efc7a8; box-shadow: 0 1px 2px rgba(74, 52, 30, .04), 0 16px 34px -16px rgba(120, 60, 20, .28); }
.experiment-card:active { transform: none; }
.experiment-card h2 { margin: 16px 0 6px; font-size: 21px; }
.experiment-card p { margin: 0 0 18px; font-size: 14.5px; }
.experiment-card footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; align-self: stretch; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--subtle); }
.card-arrow { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); border: 1px solid var(--accent-edge); color: var(--accent-deep); font-size: 16px; }

/* Status chips (cards, experiment header, run settings) */
.card-status, .experiment-state, .pill {
  display: inline-flex; align-items: center; gap: 7px; width: max-content; max-width: 100%;
  padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--muted); background: #f6f0e8; border: 1px solid var(--line);
}
.card-status::before, .experiment-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #a39a8f; }
.experiment-card[data-state="active"] .card-status, .experiment-state[data-status="active"] { color: var(--good); background: var(--good-soft); border-color: #bfe6d3; }
.experiment-card[data-state="active"] .card-status::before, .experiment-state[data-status="active"]::before { background: #1a9b6f; box-shadow: 0 0 0 3px rgba(26, 155, 111, .18); }
.experiment-card[data-state="paused"] .card-status, .experiment-state[data-status="paused"] { color: var(--warn); background: var(--warn-soft); border-color: #f1d9a0; }
.experiment-card[data-state="paused"] .card-status::before, .experiment-state[data-status="paused"]::before { background: #c58a1a; }

.empty-experiments { max-width: 70ch; margin: 22px 0; padding: clamp(22px, 4vw, 38px); border-radius: var(--r-lg); }
.empty-experiments p { margin: 0; }
.archived-list section { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.archived-list section > h3 { margin: 0 auto 0 0; overflow-wrap: anywhere; }
.archived-list section > form, .archived-list section > details { margin: 0; }
.archived-list section > details[open] { flex-basis: 100%; }
.archived-list summary.button { list-style: none; }
.archived-list summary.button::-webkit-details-marker { display: none; }

/* ---------- One experiment ---------- */
.experiment-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; padding: 18px 0 20px; }
.experiment-identity { min-width: 0; }
.experiment-identity h1 { margin: 12px 0 6px; overflow-wrap: anywhere; }
.experiment-identity p { margin: 0; font-size: 14px; }
.experiment-context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(50%, 520px); }
.experiment-context select { text-overflow: ellipsis; }

/* Section tabs (shown on phones): plain text with an orange underline */
.studio-nav {
  display: none; gap: 2px; margin-bottom: 20px; padding: 0; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.studio-nav::-webkit-scrollbar { display: none; }
.studio-nav a { flex: 0 0 auto; padding: 11px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; text-align: center; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.studio-nav a:hover { text-decoration: none; color: var(--ink); }
.studio-nav a[aria-current="page"] { color: var(--accent-deep); border-bottom-color: var(--accent); font-weight: 600; }

.notice, .app-status { margin: 0 0 16px; padding: 13px 16px; border-radius: var(--r-md); font-size: 14.5px; color: var(--ink); box-shadow: none; }
.notice { background: #fff6e3; border-color: #f1dfb2; }
.app-status { background: var(--good-soft); border-color: #bfe6d3; font-weight: 500; }
#error:empty { display: none; }
#error, .create-error { margin: 0 0 16px; padding: 13px 16px; border-radius: var(--r-md); background: var(--bad-soft); border: 1px solid #f5c3ca; color: var(--bad); font-weight: 500; }
.filter-note, .health-note { font-size: 13.5px; color: var(--muted); }
.help { font-size: 14.5px; }

/* Results */
.overview-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.overview-title h2 { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 20px; }
/* Stat chip: peach icon square, label on the left, value on the right (as in Concept 2) */
.metric {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 2px;
  padding: 14px 16px; border-radius: var(--r-md); font-size: 14px; font-weight: 500; color: var(--ink);
}
.metric::before {
  content: ''; grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 9px;
  background: var(--accent-soft) center / 18px 18px no-repeat; border: 1px solid var(--accent-edge);
}
.metric:nth-child(1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8703f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.6'/%3E%3Cpath d='M5 20c.8-3.6 3.6-5.4 7-5.4s6.2 1.8 7 5.4'/%3E%3C/svg%3E"); }
.metric:nth-child(2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8703f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l4 4v14H7z'/%3E%3Cpath d='M14 3v4h4M10 12h5M10 16h5'/%3E%3C/svg%3E"); }
.metric:nth-child(3)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8703f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M8.2 12.3l2.6 2.6 5-5.4'/%3E%3C/svg%3E"); }
.metric:nth-child(4)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8703f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h14a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a1 1 0 0 1-1-1z'/%3E%3Cpath d='M4 7l12-3v3M16 13.5h.01'/%3E%3C/svg%3E"); }
.metric span { display: block; }
.metric strong { grid-column: 3; grid-row: 1; margin: 0; font-size: clamp(18px, 1.7vw, 22px); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.metric small { grid-column: 2 / -1; grid-row: 2; font-weight: 400; }
.metric.accent { background: var(--accent-soft); border-color: var(--accent-edge); }
.metric.accent::before { background-color: #fff; }
.metric.accent strong { color: var(--accent-deep); }
.metric.accent small { color: #8a4a26; }

.report-filters { margin: 0 0 18px; }
.report-filters summary span { font-size: 13.5px; font-weight: 400; color: var(--muted); }
.report-filters[open] > summary { margin-bottom: 14px; }
.filter-row, .run-actions, .export-row, .pager, .dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filter-row { align-items: flex-end; margin-bottom: 14px; }
.filter-row label { flex: 1; min-width: 160px; }
.export-row { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.export-row span { font-size: 13px; color: var(--subtle); }
.pager { justify-content: center; margin-top: 16px; font-size: 14px; }
.run-actions { margin: 6px 0 18px; }
#order-count { font-size: 14px; }

.table-wrap { max-width: 100%; overflow: auto; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 12px 15px; text-align: left; white-space: nowrap; font-size: 14px; border-bottom: 1px solid var(--line); }
thead th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tbody tr:hover > * { background: #fffaf5; }
.interaction-table { max-height: min(480px, 65vh); }
.interaction-table thead th { position: sticky; top: 0; z-index: 1; }
tbody th { font-weight: 600; white-space: normal; min-width: 5.5em; }
.table-wrap + p, .table-wrap + .filter-note { margin-top: 12px; }
tbody tr:last-child > * { border-bottom: 0; }
td small { font-size: 12px; }

/* Ad links */
.ad-links-heading { margin-bottom: 16px; }
.destination-grid, .health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.destination-grid article, .health-card, .split-link-option, .heat-card {
  min-width: 0; padding: 18px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface-2);
}
.destination-grid code { display: block; margin: 10px 0; background: var(--surface); border: 1px solid var(--line); }
.destination-grid article > a { display: inline-block; margin-top: 6px; }
.page-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-edge); }
.ad-links article + article .page-badge { color: #4f493f; background: #f1ebe2; border-color: #e1d8ca; }
.ad-links h3 { margin: 12px 0 6px; font-size: 19px; }
.ad-links button { margin: 12px 0 14px; }
.ad-links small { margin-top: 4px; }
.split-link-option { margin-top: 20px; }
.copy-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.installation-check { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: 15px; }
.studio form[data-api="edit"], .experiment-dialog form, .login-panel form, form[data-api="fallback"] { display: grid; gap: 16px; }
.studio form[data-api="edit"] > button, form[data-api="fallback"] > button { justify-self: start; }
.studio form[data-api="promoted-product"] { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 14px 0; }
.studio form[data-api="promoted-product"] label { flex: 1; min-width: 220px; }
form[data-api="runs"] > .destination-grid { margin-bottom: 4px; }

/* Chart: orange area line with a hover tooltip (Concept 2) */
.chart-panel { padding-bottom: clamp(14px, 2vw, 22px); }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 10px; }
.chart-head h2 { margin-bottom: 2px; }
.chart-sub { margin: 0; font-size: 14px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.chart-key { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.chart-key i { width: 10px; height: 10px; border-radius: 50%; background: #e8703f; }
.chart-key.b i { background: #8a8173; }
.chart-key small { display: inline; margin-left: 2px; font-weight: 400; }
.results-chart { position: relative; min-height: 120px; }
.results-chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-tick { fill: var(--subtle); font-size: 12px; }
.chart-line { fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.chart-line.a { stroke: #e8703f; }
.chart-line.b { stroke: #8a8173; }
.chart-guide { stroke: var(--line-strong); stroke-width: 1.5; opacity: 0; transition: opacity .12s ease; }
.chart-dot { fill: #e8703f; stroke: #fff; stroke-width: 2.5; opacity: 0; transition: opacity .12s ease; }
.chart-dot.b { fill: #8a8173; }
.chart-guide.on, .chart-dot.on { opacity: 1; }
.chart-hit { fill: transparent; cursor: crosshair; }
.chart-tip {
  position: absolute; top: 6px; transform: translateX(-50%); display: grid; gap: 4px; min-width: 150px; padding: 10px 13px; pointer-events: none;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); font-size: 13px;
}
.chart-tip strong { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.chart-tip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-empty { margin: 0; padding: 36px 12px; text-align: center; border-radius: var(--r-md); border: 1px dashed var(--line-strong); background: var(--surface-2); }
@media (max-width: 640px) { .chart-legend { gap: 6px 14px; } .chart-tip { min-width: 130px; } }

/* Tracking check */
.health-card dl { margin: 10px 0 0; }
.health-card dt { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.health-card dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; }
#health-store { margin: 18px 0; }

/* Heatmaps */
.heat-layout { max-width: 300px; margin: 14px 0; }
.heat-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.heat-card canvas { display: block; width: 100%; height: 290px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); }
.heat-key, .heat-depth { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0; font-size: 13.5px; }
.heat-key span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.heat-key span::before { content: ''; width: 14px; height: 14px; border-radius: 4px; background: #f6f2ec; border: 1px solid #cfc6b9; }
.heat-key span:nth-child(2)::before { background: #6ea891; }
.heat-key span:nth-child(3)::before { background: #edc45a; }
.heat-key span:nth-child(4)::before { background: #eb8845; }
.heat-key span:nth-child(5)::before { background: #ce4439; }
.heat-depth div { padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.heat-depth dt { font-size: 12px; color: var(--muted); }
.heat-depth dd { margin: 2px 0 0; font-weight: 600; }
.heat-preview { width: max-content; max-width: 96vw; padding: 16px; border-radius: var(--r-lg); color: var(--ink); box-shadow: var(--shadow-pop); }
.heat-preview header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.heat-preview header h3 { margin: 0 auto 0 0; }
.heat-preview header form { margin: 0; }
.heat-preview [role=status] { margin: 8px 0; }
.heat-viewport { overflow: auto; max-width: 100%; border-radius: var(--r-sm); }
.heat-viewport iframe { display: block; max-width: none; height: 68vh; border: 0; background: #fff; }

/* Dialogs */
dialog::backdrop { background: rgba(48, 34, 20, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.experiment-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: clamp(22px, 4vw, 30px); border-radius: var(--r-lg); color: var(--ink); box-shadow: var(--shadow-pop); }
.experiment-dialog h2 { margin-bottom: 18px; }
.experiment-dialog #fallback-help { margin: -8px 0 0; font-size: 13.5px; }

/* Sign in, messages, setup and connector pages */
.login-panel { width: min(480px, calc(100% - 32px)); margin: 10vh auto; padding: clamp(24px, 5vw, 38px); border-radius: var(--r-lg); }
.login-panel .brand { margin-bottom: 22px; }
.login-panel form { margin-bottom: 14px; }
.login-panel [role=alert] { color: var(--bad); font-weight: 500; margin: 0; }
.login-panel [role=alert]:empty { display: none; }
.report-panel pre { overflow: auto; margin: 0 0 14px; padding: 16px; border-radius: var(--r-sm); background: #faf5ee; border: 1px solid var(--line); line-height: 1.7; }
.report-panel textarea { min-height: 96px; margin-bottom: 12px; }
#connection-trace ul { font-size: 14px; }

/* Google Analytics page */
.google-workspace .directory-heading { margin-top: 16px; }
.google-report-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.google-report-pair .report-panel { margin-top: 0; min-width: 0; }
.google-tag-list { list-style: none; display: grid; gap: 10px; padding: 0; }
.google-tag-list li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0; padding: 13px 15px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.google-setup li { margin: 14px 0; }
.google-warnings { color: var(--warn); font-size: 14px; }

.dashboard-footer { margin-top: 30px; text-align: center; font-size: 12.5px; color: var(--subtle); }
.more { margin: 10px 0 0; }
.more > summary { font-size: 13.5px; }
.more > p { margin: 8px 0 0; }

/* Menu header: logo and menu button share the first row; the store name sits beneath */
@media (min-width: 761px) {
  .side-head .side-toggle { order: 2; }
  .side-head .store-name { order: 3; flex: 0 0 100%; max-width: max-content; margin-top: 2px; }
}

/* ---------- Tablets ---------- */
@media (min-width: 761px) and (max-width: 1100px) {
  .studio.dashboard { grid-template-columns: 240px minmax(0, 1fr); gap: 0 18px; width: 97%; }
  .side-nav { padding-inline: 8px; }
  .destination-grid, .health-grid, .google-report-pair { grid-template-columns: 1fr; }
  .experiment-header { display: grid; align-items: start; gap: 16px; }
  .experiment-context { width: 100%; }
  .menu-closed .destination-grid, .menu-closed .health-grid, .menu-closed .google-report-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-closed .experiment-header { display: flex; }
  .menu-closed .experiment-context { width: min(50%, 520px); }
}
@media (max-width: 1180px) and (min-width: 861px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .google-report-pair { grid-template-columns: 1fr; gap: 0; }
  .how-steps { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .experiment-header { display: grid; align-items: start; gap: 16px; }
  .experiment-context { width: 100%; }
}

/* ---------- Phones: the side menu folds into a Menu button ---------- */
@media (max-width: 760px) {
  .studio.dashboard { grid-template-columns: minmax(0, 1fr); width: min(94%, 760px); padding-bottom: env(safe-area-inset-bottom); }
  .side { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; align-items: center; margin: 12px 0 0; }
  .side-head { order: 1; flex: 1 1 100%; flex-wrap: nowrap; border-bottom: 0; padding-bottom: 12px; }
  .side .create-action { order: 2; width: calc(100% - 28px); margin: 0 14px 14px; }
  .side-nav { order: 3; display: none; flex-basis: 100%; border-top: 1px solid var(--line); }
  .menu-open .side-nav { display: block; animation: rise-in .25s ease backwards; }
  .menu-open .side-toggle { background: var(--accent-soft); border-color: var(--accent-edge); color: var(--accent-deep); }
  .studio-nav { display: flex; }
  .studio .content { margin: 12px 0 20px; border-radius: 18px; }
}
@media (max-width: 640px) {
  .destination-grid, .health-grid, .experiment-context { grid-template-columns: 1fr; }
  .directory-heading { align-items: flex-start; flex-direction: column; }
  .directory-heading dl { width: 100%; }
  .directory-heading dl div { flex: 1; min-width: 0; }
  .report-panel, .run-panel { margin: 14px 0; border-radius: var(--r-md); }
  .button { min-height: 44px; }
  .button.compact { min-height: 40px; }
  .filter-row { display: grid; grid-template-columns: 1fr; }
  .filter-row label { min-width: 0; }
  .ad-links button, .copy-group .button { width: 100%; }
  .report-panel pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .report-filters summary span { display: block; }
  .login-panel { margin: 6vh auto; }
  th, td { padding: 11px 12px; }
}
@media (max-width: 380px) {
  .metric-grid { gap: 10px; }
  .metric { padding: 12px; column-gap: 10px; }
  .metric::before { width: 32px; height: 32px; }
}

/* ---------- Closed menu (wider screens): a slim strip of icons ---------- */
@media (min-width: 761px) {
  .menu-closed .studio.dashboard { grid-template-columns: 76px minmax(0, 1fr); }
  .menu-closed .side { align-items: center; overflow-x: hidden; }
  .menu-closed .side-head { flex-direction: column; justify-content: center; width: 100%; padding: 14px 0; gap: 12px; }
  .menu-closed .brand { font-size: 0; gap: 0; }
  .menu-closed .store-name, .menu-closed .side-head .store-name, .menu-closed .side-nav h2, .menu-closed .side-nav a span,
  .menu-closed .side-note, .menu-closed .side-out span, .menu-closed .side-hint, .menu-closed .create-action .label, .menu-closed .theme-switch span { display: none; }
  .menu-closed .theme-switch { grid-template-columns: 1fr; margin: 0; }
  .menu-closed .side-toggle { margin: 0; }
  .menu-closed .side .create-action { width: 44px; min-height: 44px; margin: 12px 0 4px; padding: 0; font-size: 22px; }
  .menu-closed .side-nav { padding: 6px 8px 12px; }
  .menu-closed .side-nav ul { gap: 4px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .menu-closed .side-nav ul:last-of-type { border-bottom: 0; }
  .menu-closed .side-nav a, .menu-closed .side-out { justify-content: center; padding: 10px; }
}

/* Keep jumped-to panels clear of the top edge */
[id] { scroll-margin-top: 20px; }

/* ---------- Motion: restrained ---------- */
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes veil-in { from { opacity: 0; } }
.content > *, .content > section > *, .experiment-grid > li, .how-steps > li, .login-panel, .metric {
  animation: rise-in .28s cubic-bezier(.2, .7, .2, 1) backwards;
}
.content > :nth-child(2), .experiment-grid > li:nth-child(2), .how-steps > li:nth-child(2), .metric:nth-child(2) { animation-delay: .03s; }
.content > :nth-child(3), .experiment-grid > li:nth-child(3), .how-steps > li:nth-child(3), .metric:nth-child(3) { animation-delay: .06s; }
.content > :nth-child(4), .experiment-grid > li:nth-child(4), .metric:nth-child(4) { animation-delay: .09s; }
.content > :nth-child(n+5), .experiment-grid > li:nth-child(n+5) { animation-delay: .11s; }
details[open] > :not(summary) { animation: rise-in .25s ease backwards; }
dialog[open] { animation: pop-in .25s cubic-bezier(.2, .8, .2, 1) backwards; }
dialog[open]::backdrop { animation: veil-in .25s ease backwards; }
.app-status:not([hidden]), #error:not(:empty) { animation: rise-in .25s ease backwards; }

/* Moving between pages: the menu stays put while the content fades */
@view-transition { navigation: auto; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; } }
::view-transition-old(root) { animation: page-out .14s ease both; }
::view-transition-new(root) { animation: page-in .2s ease both; }
.is-switching .content { view-transition-name: page-content; }
::view-transition-group(side-menu), ::view-transition-group(page-content) {
  animation-duration: .32s; animation-timing-function: cubic-bezier(.3, .7, .2, 1); overflow: clip;
}
::view-transition-old(side-menu), ::view-transition-new(side-menu),
::view-transition-old(page-content), ::view-transition-new(page-content) {
  width: 100%; height: 100%; object-fit: none; object-position: left top;
}

/* Touch screens have no hover: nothing should "stick" after a tap */
@media (hover: none) {
  .experiment-card:hover, .experiment-card:focus-visible { transform: none; }
}

/* ---------- Second look: "Simple light" — deliberately different from Soft glass:
   cool white and grey instead of cream, a calm green accent instead of orange, no shadows,
   no backdrop, squarer corners, and light tinted buttons instead of solid ones. ---------- */
html[data-theme="simple"] {
  --bg: #f6f7f8; --surface: #ffffff; --surface-2: #f6f7f8; --field: #ffffff;
  --ink: #1f2326; --muted: #586067; --subtle: #6a7279;
  --accent: #2f9468; --accent-deep: #1c6b4a; --accent-ink: #15523a;
  --accent-soft: #e8f4ed; --accent-edge: #c3e2d0;
  --btn: #e3f2e9; --btn-hover: #d3ebdd;
  --line: #e2e5e8; --line-strong: #cdd2d7;
  --shadow: none; --shadow-sm: none; --inset: none; --shadow-pop: 0 20px 50px -20px rgba(30, 36, 40, .35);
  --ring: 0 0 0 3px rgba(47, 148, 104, .24);
  --r-lg: 8px; --r-md: 6px; --r-sm: 6px;
}
[data-theme="simple"] body::before, [data-theme="simple"] body::after { display: none; }
[data-theme="simple"] .how-steps li { background: #fff; }
/* Cards sit straight on the page: no tinted tray around the content. */
[data-theme="simple"] .studio .content { background: none; border-color: transparent; border-radius: 0; padding-left: 0; padding-right: 0; }
[data-theme="simple"] .side, [data-theme="simple"] .studio .content { box-shadow: none; }
[data-theme="simple"] .button { border-radius: 6px; }
[data-theme="simple"] .button:hover { background: #eef0f2; border-color: #b9c0c6; }
[data-theme="simple"] .button.dark, [data-theme="simple"] .button.create-action { color: var(--accent-ink); border-color: var(--accent-edge); box-shadow: none; }
[data-theme="simple"] .button.dark:hover, [data-theme="simple"] .button.create-action:hover { background: var(--btn-hover); border-color: #a9d3bd; }
[data-theme="simple"] .brand::before { background-color: #2f9468; box-shadow: none; border-radius: 6px; }
[data-theme="simple"] .experiment-card:hover, [data-theme="simple"] .experiment-card:focus-visible { transform: none; box-shadow: none; border-color: #9fcdb5; }
[data-theme="simple"] .store-name, [data-theme="simple"] .card-status, [data-theme="simple"] .experiment-state, [data-theme="simple"] .pill, [data-theme="simple"] .page-badge { border-radius: 4px; }
[data-theme="simple"] .theme-switch { background: #eceef0; }
[data-theme="simple"] code, [data-theme="simple"] .report-panel pre { background: #eef0f2; }
[data-theme="simple"] .swatch.glass { background: linear-gradient(135deg, #ffd9bd, #fff4e8); }
[data-theme="simple"] .swatch.simple { background: linear-gradient(135deg, #ffffff 50%, #bfe3cf 50%); }
/* The little number-card icons are drawn in orange; show them in neutral grey here. */
[data-theme="simple"] .metric::before { filter: grayscale(1); background-color: #f1f3f4; border-color: var(--line); }
[data-theme="simple"] .metric.accent small { color: var(--accent-ink); }
/* Chart: Page A in green here, Page B stays grey. */
[data-theme="simple"] .chart-key i, [data-theme="simple"] .chart-dot { background: #2f9468; fill: #2f9468; }
[data-theme="simple"] .chart-key.b i, [data-theme="simple"] .chart-dot.b { background: #7b838a; fill: #7b838a; }
[data-theme="simple"] .chart-line.a { stroke: #2f9468; }
[data-theme="simple"] .chart-line.b { stroke: #7b838a; }
[data-theme="simple"] #chart-fill-a stop { stop-color: #2f9468; }
[data-theme="simple"] #chart-fill-b stop { stop-color: #7b838a; }
[data-theme="simple"] dialog::backdrop { background: rgba(30, 36, 40, .32); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- Developer guide ---------- */
.guide { scroll-behavior: smooth; }
.guide .report-panel { scroll-margin-top: 18px; }
.guide .report-panel > h2 { margin-bottom: 14px; }
.guide .report-panel p, .guide .report-panel li { font-size: 15.5px; line-height: 1.75; overflow-wrap: anywhere; }
.guide .report-panel li { margin: 0 0 10px; }
.guide .report-panel li::marker { color: var(--accent-deep); font-weight: 600; }
.guide h3 { margin: 30px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 18px; scroll-margin-top: 18px; }
.guide h4 { margin: 24px 0 10px; font-size: 16px; }
.guide-intro p:first-of-type { font-size: 17px; }
.guide-contents ol { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; }
.guide .guide-contents li { margin: 0; }
.guide-contents a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 14.5px; font-weight: 500; line-height: 1.35; transition: background-color .15s ease, border-color .15s ease; }
.guide-contents a:hover { text-decoration: none; background: var(--accent-soft); border-color: var(--accent-edge); }
.guide-contents b, .guide-step b { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); border: 1px solid var(--accent-edge); color: var(--accent-deep); font-size: 13px; }
.guide-step { display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.guide-code { position: relative; margin: 16px 0; }
.guide-code pre { margin: 0; padding: 18px; padding-right: 96px; font-size: 13px; tab-size: 2; }
.guide-code pre code { padding: 0; border-radius: 0; background: none; }
.guide .report-panel a { overflow-wrap: anywhere; }
.guide-code .button { position: absolute; top: 10px; right: 10px; z-index: 1; min-height: 0; padding: 5px 12px; font-size: 12.5px; }
.guide .table-wrap { margin: 16px 0; }
.guide-table td, .guide-table th { white-space: normal; overflow-wrap: anywhere; }
.guide-table td { font-family: "SF Mono", ui-monospace, Consolas, Menlo, monospace; font-size: 13px; }
.guide-top { display: inline-block; margin-top: 12px; font-size: 13.5px; }
[data-theme="simple"] .guide-contents a { background: #fff; }
[data-theme="simple"] .guide-contents a:hover { background: #eef0f2; border-color: var(--line-strong); }
@media (max-width: 640px) {
  .guide-contents ol { grid-template-columns: 1fr; }
  .guide-code pre { padding-right: 18px; padding-top: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
.hermes-workspace{max-width:1100px}
.hermes-list{display:grid;gap:16px}
.hermes-card{margin:0;min-width:0}
.hermes-card>summary{display:flex;align-items:center;justify-content:space-between;gap:18px;cursor:pointer;list-style:none}
.hermes-card>summary>span:first-child{display:grid;gap:8px;min-width:0}
.hermes-card>summary strong{font-size:1.2rem;line-height:1.4;overflow-wrap:anywhere}
.hermes-card>summary small{opacity:.7}
details.report-panel.hermes-card>summary::before{display:none}
.hermes-card>summary::after{content:'+';font-size:1.5rem}
.hermes-card[open]>summary::after{content:'−'}
.hermes-card .pill{white-space:normal;text-align:center;flex-shrink:0}
.hermes-details{max-height:60vh;overflow:auto;margin-top:24px;padding-right:16px;border-top:1px solid var(--line,#ddd)}
.hermes-detail{margin:20px 0;min-width:0}
.hermes-detail h3{font-family:inherit;font-size:1rem;margin:0 0 8px;line-height:1.4}
.hermes-detail p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;margin:0}
.hermes-decision{border-top:1px solid var(--line,#ddd);padding-top:20px;margin-top:20px}
.hermes-decision label{display:grid;gap:8px}
.hermes-decision textarea{width:100%;box-sizing:border-box;font:inherit;padding:12px;border:1px solid var(--line,#ddd);border-radius:10px;resize:vertical}
.hermes-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:16px}
@media(max-width:600px){.hermes-card>summary{flex-wrap:wrap}.hermes-card .pill{flex-shrink:1}.hermes-details{padding-right:8px}.hermes-actions .button{width:100%}}
