/* Planning Assistant styles, shared by the teacher planner and EP at Home (which adds family.css).
   Calm by design: neutral grays, one accent (EP blue) for the main action and
   whatever is selected, and one-color line icons. */

:root {
  --blue: #3a3aff;
  --blue-dark: #2a2acc;
  --blue-soft: #f0f0ff;
  --ink: #1f2937;
  --text: #374151;
  --muted: #6b7280;
  --icon: #4b5563;
  --line: #e5e7eb;
  --chip: #f3f4f6;
  --bg: #fafafa;
  --card: #ffffff;
  --red: #b91c1c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
  --focus: 0 0 0 3px rgba(58, 58, 255, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); }
[hidden] { display: none !important; }

.icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--icon); }
.btn-primary .icon { color: currentColor; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 300;
}
.skip-link:focus { left: 8px; }

/* ── Top bar ──────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 clamp(16px, 4vw, 40px);
  background: var(--blue);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 40px; width: auto; background: #fff; border-radius: 6px; padding: 3px 6px; }
.brand-label { color: #fff; font-weight: 600; font-size: 15px; }
.topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.class-chip {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  min-height: 36px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff; font-size: 14px;
}
.class-chip:hover { background: rgba(255, 255, 255, 0.2); }
.class-chip-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.class-chip-text strong { font-weight: 600; }
.class-chip .icon { color: #fff; width: 15px; height: 15px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.beta-pill {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  color: #fff; border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 2px 10px; border-radius: 999px;
}

.wrap { max-width: 820px; margin: 0 auto; padding: 32px 16px 120px; }

/* ── Shared ───────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px;
}
.hint { color: var(--muted); font-size: 14px; }
.optional { color: var(--muted); font-weight: 400; }
.field-error { color: var(--red); font-size: 14px; font-weight: 500; }
.field-error:empty { display: none; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1.2;
  transition: background 0.15s, border-color 0.15s;
}
.btn:disabled { cursor: not-allowed; opacity: 0.5; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); }
.btn-secondary, .btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover:not(:disabled), .btn-ghost:hover:not(:disabled) { background: var(--chip); }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 17px; width: 100%; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-sm .icon { width: 16px; height: 16px; }
.link-btn { background: none; border: 0; color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 6px 4px; border-radius: 6px; }
.icon-btn { background: none; border: 0; font-size: 26px; line-height: 1; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); }
.icon-btn:hover { background: var(--chip); }

input[type="text"], select, textarea {
  width: 100%;
  border: 1px solid #d1d5db; border-radius: var(--radius-sm);
  background: #fff; padding: 12px 14px; font-size: 16px;
  transition: border-color 0.15s;
}
input[type="text"]:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: var(--focus); outline: none; }
textarea { resize: vertical; line-height: 1.5; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--ink); }

/* ── Composer ─────────────────────────────────────────────── */
.composer { display: flex; flex-direction: column; gap: 32px; }

.class-form { display: flex; flex-direction: column; gap: 16px; }
.class-form-head { display: flex; flex-direction: column; gap: 2px; }
.class-form .btn { align-self: flex-start; }
.class-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }

/* First visit: class setup is the whole screen */
body.welcome .mode-switch, body.welcome .plan-steps, body.welcome .check-steps { display: none; }
body.welcome .class-form { max-width: 520px; width: 100%; margin: 24px auto 0; padding: 28px; gap: 20px; }
body.welcome .class-form .step-title { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: clamp(26px, 5vw, 30px); }
body.welcome .class-fields { grid-template-columns: 1fr; }
body.welcome .class-form .btn { align-self: stretch; min-height: 52px; background: var(--blue); color: #fff; border-color: var(--blue); font-size: 16px; }
body.welcome .class-form .btn:hover { background: var(--blue-dark); }

/* Sign-in */
body.needs-signin .composer > :not(#signin-card) { display: none !important; }
body.needs-signin .class-chip { display: none !important; }
.signin-card { max-width: 520px; width: 100%; margin: 24px auto 0; padding: 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.signin-card .step-title { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: clamp(26px, 5vw, 30px); }
#google-signin-btn { min-height: 44px; }
.signed-in-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.topbar-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px;
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
}
.topbar-link:hover { background: rgba(255, 255, 255, 0.15); }
button.topbar-link { background: none; border: 0; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
#topbar-signout { font-weight: 500; color: rgba(255, 255, 255, 0.85); }
.topbar-link .icon { color: #fff; width: 16px; height: 16px; }

/* Mode switch */
.mode-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--chip); border-radius: 999px; padding: 4px; max-width: 400px;
}
.mode-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; border: 0; border-radius: 999px; background: transparent;
  font-weight: 600; font-size: 15px; color: var(--muted);
}
.mode-btn:hover { color: var(--ink); }
.mode-btn[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(17, 24, 39, 0.1); }
.plan-steps, .check-steps { display: flex; flex-direction: column; gap: 32px; }

.step { display: flex; flex-direction: column; gap: 12px; }
.step-title { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.step-title.big {
  display: flex; align-items: center; gap: 12px;
  font-family: 'DM Serif Display', Georgia, serif; font-weight: 400;
  font-size: clamp(24px, 4.5vw, 30px); letter-spacing: -0.01em;
}
.step-num {
  flex-shrink: 0; display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--ink); color: var(--ink);
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 15px;
}

#prompt-input, #check-input { font-size: 17px; padding: 16px; min-height: 104px; border-radius: var(--radius); }

details.more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.more > summary {
  list-style: none; cursor: pointer; padding: 12px 0; min-height: 44px;
  font-weight: 600; font-size: 15px; color: var(--blue-dark); display: flex; align-items: center; gap: 8px;
}
details.more > summary:hover { text-decoration: underline; text-underline-offset: 3px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; width: 16px; color: var(--blue-dark); font-weight: 400; font-size: 20px; line-height: 1; }
details.more[open] > summary::before { content: "−"; }
details.more > :not(summary) { margin: 0 0 14px; }

.pattern-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pattern-chip {
  text-align: left; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff; font-size: 14px;
}
.pattern-chip strong { display: block; color: var(--ink); font-weight: 600; }
.pattern-desc { display: block; color: var(--muted); font-size: 13px; }
.pattern-chip:hover { background: var(--chip); }
.pattern-chip[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); }

/* Section tiles: each card holds its button and, for some parts, an optional field */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px; align-items: start; }
.tile-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tile-card:hover { border-color: #d1d5db; }
.tile-card.selected { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.tile {
  position: relative; display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  min-height: 68px; padding: 12px 48px 12px 16px;
  background: transparent; border: 0; border-radius: var(--radius);
}
.tile-icon { display: grid; place-items: center; }
.tile-icon .icon { width: 22px; height: 22px; }
.tile-body { display: flex; flex-direction: column; }
.tile-name { font-weight: 600; color: var(--ink); font-size: 16px; }
.tile-desc { color: var(--muted); font-size: 14px; }
.tile-check {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #d1d5db; background: #fff;
}
.tile[aria-pressed="true"] .tile-check {
  border-color: var(--blue); background: var(--blue)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1.5' stroke='white' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center no-repeat;
}
.tile-card-full { margin-bottom: 0; }

.tile-extra { border-top: 1px solid var(--line); padding: 4px 12px 12px 52px; display: flex; flex-direction: column; gap: 8px; }
.extra-toggle {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 4px 0; background: none; border: 0;
  font-size: 14px; font-weight: 600; color: var(--blue-dark);
}
.extra-toggle:hover { text-decoration: underline; text-underline-offset: 3px; }
.extra-toggle .icon { width: 15px; height: 15px; color: currentColor; transition: transform 0.15s; }
.extra-toggle[aria-expanded="true"] .icon { transform: rotate(45deg); }
.extra-toggle .optional { font-weight: 400; }
.extra-body { display: flex; flex-direction: column; gap: 6px; }
.extra-body textarea, .extra-body input { font-size: 15px; padding: 10px 12px; }

.generate-row { display: flex; flex-direction: column; gap: 10px; }
.step-two { display: flex; flex-direction: column; gap: 32px; }
.step-two.appear { animation: appear 0.35s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step-two.appear { animation: none; } }
.generate-row .btn-lg:disabled { background: #c7c9d1; opacity: 1; }

/* ── Loading ──────────────────────────────────────────────── */
.loading { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.loading-title { font-weight: 600; color: var(--ink); }
.spinner {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--blue);
  animation: spin 0.9s linear infinite;
}
.spinner.small { width: 22px; height: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s; } html { scroll-behavior: auto; } }

/* ── Plan ─────────────────────────────────────────────────── */
.plan { margin-top: 48px; display: flex; flex-direction: column; gap: 20px; outline: none; }
.plan-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); }
.plan-title { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: clamp(26px, 5vw, 34px); color: var(--ink); line-height: 1.15; }
.plan-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.callout { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: var(--radius-sm); padding: 14px 16px; }

.schema-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 8px;
}
.schema-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.schema-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.schema-term { font-weight: 400; color: var(--muted); }
.pattern-pill { background: var(--chip); color: var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 14px; font-weight: 500; }
.schema-feed { color: var(--text); }

.section-nav {
  position: sticky; top: 64px; z-index: 40;
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }
.nav-pill {
  flex-shrink: 0; white-space: nowrap; text-decoration: none;
  min-height: 36px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
  color: var(--muted); font-size: 14px; font-weight: 500;
}
.nav-pill .icon { width: 16px; height: 16px; color: currentColor; }
.nav-pill:hover { background: var(--chip); color: var(--ink); }
.nav-pill[aria-current="true"] { background: #fff; border-color: var(--ink); color: var(--ink); font-weight: 600; }

#plan-sections { display: flex; flex-direction: column; gap: 36px; }
.plan-section { display: flex; flex-direction: column; gap: 14px; }
.plan-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.plan-section-title { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 700; color: var(--ink); }
.section-icon { display: grid; place-items: center; }
.section-icon .icon { width: 22px; height: 22px; }
.plan-section-body { display: flex; flex-direction: column; gap: 12px; }

.idea {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.idea-targeted { border-color: var(--ink); }
.targeted-badge { align-self: flex-start; background: var(--chip); color: var(--ink); font-weight: 600; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
.idea-where { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: -8px; }
.idea-where .icon { width: 15px; height: 15px; color: currentColor; }
.idea-name { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.idea-text { font-size: 16px; color: var(--ink); }

.support { display: flex; flex-direction: column; gap: 6px; }
.support-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.support ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.support li { font-size: 15px; }

.questions li { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: baseline; }
.q-type { font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }

.words strong { color: var(--ink); font-weight: 600; }
.word-meaning { color: var(--muted); }
.word-connection { display: block; font-size: 14px; color: var(--muted); font-style: italic; }

.checklist li { position: relative; padding-left: 24px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border: 1.5px solid #9ca3af; border-radius: 4px; }

/* Tabs for the rest of an idea's supports. Anything tappable is outlined or blue,
   with a chevron that turns when it's open. */
.more-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.more-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.more-tab, .why-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 6px 10px 6px 14px; border-radius: 999px;
  border: 1px solid #c7cad1; background: #fff;
  font-size: 14px; font-weight: 600; color: var(--blue-dark);
  transition: background 0.15s, border-color 0.15s;
}
.more-tab:hover, details.why > summary:hover .why-btn { background: var(--blue-soft); border-color: var(--blue); }
.more-tab .icon, .why-btn .icon { width: 16px; height: 16px; color: currentColor; transition: transform 0.15s; }
.more-tab[aria-expanded="true"] { background: var(--blue-soft); border-color: var(--blue); }
.more-tab[aria-expanded="true"] .icon, details.why[open] .why-btn .icon { transform: rotate(180deg); }
.more-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--chip); color: var(--ink); font-size: 12px; font-weight: 600;
}
.more-panel { padding: 4px 4px 0; }
.more-panel .support-label { display: none; }

details.why { border-top: 1px solid var(--line); padding-top: 12px; }
details.why > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  border-radius: 999px;
}
details.why > summary::-webkit-details-marker { display: none; }
details.why p { margin-top: 10px; color: var(--text); font-size: 15px; }
.align-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.align-tag { font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 6px; background: var(--chip); color: var(--muted); }

/* Anchor text */
.book-head { display: flex; gap: 14px; align-items: flex-start; }
.book-cover { flex-shrink: 0; display: grid; place-items: center; width: 52px; height: 66px; border-radius: 4px 8px 8px 4px; background: var(--chip); }
.book-cover .icon { width: 24px; height: 24px; }
.book-title { font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.book-meta { color: var(--muted); }
.verify-note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.reads { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.read-step { display: flex; gap: 12px; }
.read-num { flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink); color: var(--ink); font-weight: 600; font-size: 13px; }
.read-step h5 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.read-step p, .read-step li { font-size: 15px; }
.read-step ul { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; margin: 4px 0; }

.empty-note { background: #fff; border: 1px dashed #d1d5db; border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; }

.another-idea.btn { align-self: flex-start; }
.another-idea.btn .icon { color: currentColor; width: 16px; height: 16px; }
.idea-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.idea-feedback-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: var(--text);
}
.vote-btn .icon { width: 15px; height: 15px; color: currentColor; }
.vote-btn:hover { background: var(--chip); }
.vote-btn[aria-pressed="true"] { border-color: var(--ink); background: var(--chip); color: var(--ink); }
.idea-feedback-thanks { font-size: 13px; color: var(--muted); }
.idea-feedback .link-btn { font-size: 14px; }

.section-loading { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px dashed #d1d5db; border-radius: var(--radius); padding: 20px; color: var(--muted); }

.add-more { display: flex; flex-direction: column; gap: 12px; box-shadow: none; }
.add-more-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.add-more-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

.plan-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 8px; }

/* ── Idea check result ────────────────────────────────────── */
.verdict {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ink);
  border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; margin-top: 24px;
}
.verdict-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--ink); }
.verdict-headline { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: clamp(20px, 3.4vw, 24px); color: var(--ink); line-height: 1.3; }
.your-idea { border-left: 2px solid var(--line); padding: 2px 0 2px 14px; display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-style: italic; }
.your-idea .support-label { font-style: normal; }
#check-body { display: flex; flex-direction: column; gap: 16px; }
.check-block { display: flex; flex-direction: column; gap: 10px; }
.check-block-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.strengths { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.strengths li { position: relative; padding-left: 24px; display: flex; flex-direction: column; gap: 4px; }
.strengths .guidebook-ref { border-top: 0; padding-top: 0; }
.strengths li::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--icon); font-weight: 700; }
.adjustments { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.adjustments li { display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.adjustments li:last-child { padding-bottom: 0; border-bottom: 0; }
.adjust-concern { font-weight: 600; color: var(--ink); }
.guidebook-ref { margin-top: 4px; }
.guidebook-ref p { font-style: italic; }
.ref-page { font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; }
.check-better { display: flex; flex-direction: column; gap: 12px; }
.check-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Feedback ─────────────────────────────────────────────── */
.feedback-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 200;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 600; font-size: 14px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.08);
}
.feedback-fab .icon { width: 16px; height: 16px; }
.feedback-panel {
  position: fixed; right: 16px; bottom: 68px; z-index: 210;
  width: min(360px, calc(100vw - 32px));
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(17, 24, 39, 0.15);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.feedback-head { display: flex; align-items: center; justify-content: space-between; }
.feedback-head h2 { font-size: 17px; color: var(--ink); }

/* ── Prompt guide (prompt-guide.html) ─────────────────────── */
a.brand { text-decoration: none; }
.guide { display: flex; flex-direction: column; gap: 28px; padding-bottom: 64px; }
.guide-title { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: clamp(30px, 6vw, 40px); color: var(--ink); line-height: 1.1; margin-top: -20px; }
.guide-lead { font-size: 18px; color: var(--text); margin-top: -12px; max-width: 620px; }
.guide-h2 { font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.ingredients { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.ingredients li { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.ing-num { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink); color: var(--ink); font-weight: 600; font-size: 14px; }
.ingredients h3 { font-size: 16px; font-weight: 700; color: var(--ink); }
.ingredients p { font-size: 15px; }
.ing-example { margin-top: 6px; color: var(--muted); font-style: italic; }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.compare-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.compare-strong { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.compare-label { font-size: 13px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.compare-strong .compare-label { color: var(--blue-dark); }
.compare-prompt { font-size: 15px; color: var(--ink); font-style: italic; }
.compare-result { font-size: 15px; border-top: 1px solid var(--line); padding-top: 8px; }
.compare-intro { margin-top: -6px; margin-bottom: 14px; }
.example { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.example-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.see-plans > summary { list-style: none; cursor: pointer; align-self: flex-start; display: inline-flex; border-radius: 999px; }
.see-plans > summary::-webkit-details-marker { display: none; }
.see-plans[open] > summary .why-btn .icon { transform: rotate(180deg); }
.see-plans[open] { display: flex; flex-direction: column; gap: 16px; }
.guide { max-width: 1040px; }
.guide-lead, .guide-list, .compare-intro { max-width: 680px; }
.example-plan { display: flex; flex-direction: column; gap: 8px; }
.example-plan-title { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 21px; color: var(--ink); line-height: 1.2; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.cmp-cell { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cmp-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.cmp-titles { padding: 4px 0 8px; align-items: stretch; }
.cmp-head { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.typed-prompt { background: var(--bg); border-left: 3px solid var(--ink); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.cmp-head:last-child .typed-prompt { border-left-color: var(--blue); }
.typed-prompt-label, .cmp-plan-label, .compare-typed { font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.typed-prompt p { font-size: 16px; color: var(--ink); font-style: italic; }
.typed-prompt-meta { font-size: 13px; color: var(--muted); }
.cmp-plan-label { margin-top: 4px; }
.compare-typed { margin-bottom: -4px; }
.cmp-titles .cmp-cell:last-child .cmp-label { color: var(--blue-dark); }
.cmp-row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.cmp-row > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 52px; padding: 10px 16px; border-radius: var(--radius);
}
.cmp-row > summary::-webkit-details-marker { display: none; }
.cmp-row > summary:hover { background: #fcfcfc; }
.cmp-title { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: var(--ink); }
.cmp-title .icon { width: 20px; height: 20px; }
.cmp-row > summary > .icon { color: var(--blue-dark); transition: transform 0.15s; }
.cmp-row[open] > summary > .icon { transform: rotate(180deg); }
.cmp-row[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.cmp-row .cmp-grid { padding: 14px; background: var(--bg); border-radius: 0 0 var(--radius) var(--radius); }
.cmp-row .cmp-cell:last-child .cmp-label { color: var(--blue-dark); }
.cmp-row .plan-section-body { gap: 10px; }
.cmp-row .idea { padding: 16px; }
@media (max-width: 760px) {
  .cmp-grid { grid-template-columns: 1fr; }
  .cmp-titles { gap: 10px; }
}
.guide-list { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.guide-back { margin-top: 4px; }
.hint a { color: var(--blue-dark); font-weight: 600; text-underline-offset: 3px; }

/* ── My plans (my-plans.html) ─────────────────────────────── */
.my-plans-head { display: flex; flex-direction: column; gap: 8px; }
.my-plans-head .guide-title { margin-top: 0; }
.saved-list { list-style: none; display: flex; flex-direction: column; gap: 8px; max-width: 820px; }
.saved-item {
  width: 100%; text-align: left; display: flex; flex-direction: column; gap: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.saved-item:hover { border-color: var(--blue); }
.saved-item-meta { font-size: 13px; color: var(--muted); }
.saved-item-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.saved-item-prompt { font-size: 15px; color: var(--text); }
.saved-item-parts { font-size: 13px; color: var(--muted); }
.my-plans-page #saved-view { margin-top: 0; max-width: 820px; }

/* ── Small screens ────────────────────────────────────────── */
@media (max-width: 600px) {
  .wrap { padding-top: 20px; }
  .brand-label, .beta-pill { display: none; }
  .topbar-link span { display: none; }
  #topbar-signout span { display: inline; }
  #topbar-signout { padding: 6px 8px; font-size: 13px; }
  .brand img { height: 34px; }
  .idea { padding: 16px; }
  .plan-actions { width: 100%; }
  .plan-actions .btn { flex: 1; }
  .questions li { grid-template-columns: 1fr; gap: 0; }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  body { background: #fff; font-size: 12pt; }
  body[data-mode="check"] #plan, body[data-mode="plan"] #check-result, .check-actions,
  .idea-feedback, .another-idea, .my-plans-head, #my-plans-list,
  .topbar, .composer, .loading, .section-nav, .plan-actions, .section-regen,
  .add-more, .plan-foot .btn, .feedback-fab, .feedback-panel, .skip-link { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .guide { gap: 14px; padding: 0; font-size: 11pt; }
  .guide-back, .see-plans { display: none !important; }
  .ingredients li, .compare-col { break-inside: avoid; padding: 10px 12px; }
  .plan { margin: 0; }
  .plan-head { border: 0; padding: 0; }
  .idea, .schema-card { box-shadow: none; break-inside: avoid; }
  .support, .read-step { break-inside: avoid; }
  details.why > summary > span:first-child::after { content: ""; }
  .more-tabs { display: none !important; }
  .more-panel { display: block !important; margin-top: 8px; padding: 0; }
  .more-panel .support-label { display: block; }
}
