/* Approved A system. The white sidebar is the explicit exception to all seven concepts. */
:root {
  --bg: #f7fcf9;
  --paper: #ffffff;
  --ink: #163b34;
  --muted: #657b78;
  --line: #d4e7e2;
  --green: #096b53;
  --deep: #075340;
  --light: #e8f7f1;
  --warm: #fff8ea;
  --coral: #ffe5df;
  --sky: #eaf5ff;
  --radius: 14px;
  --visual-radius-control: 9px;
  --visual-shadow-soft: 0 3px 12px rgb(18 77 62 / 4%);
  --visual-shadow-panel: 0 8px 24px rgb(18 77 62 / 5%);
  --shadow: var(--visual-shadow-soft);
  --sidebar: 246px;
}

body {
  color: var(--ink);
  background: radial-gradient(ellipse at 70% 0%, #f1faf6, transparent 65%), var(--bg);
  text-rendering: optimizeLegibility;
  font-size: 14px;
}
button, input, textarea, select { font-family: inherit; }
h1, h2, h3 { color: var(--ink); text-wrap: pretty; }
.muted, .head-row p, .studio-top p { color: var(--muted); }
.eyebrow, .studio-kicker { color: var(--green); font-weight: 650; }
.eyebrow { letter-spacing: .1em; }
.tiny, small { line-height: 1.65; }

.sidebar {
  inset: 0 auto 0 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  padding: 25px 20px 0;
}
.brand-mark { box-shadow: inset 0 1px 0 #ffffff38, 0 4px 9px #176b5515; }
.brand-title { letter-spacing: .04em; }
.brand-sub { color: var(--muted); }
.sidebar-heading .sidebar-collapse { border-radius: 8px; background: #f7faf7; border-color: var(--line); }
.sidebar-heading { margin-bottom: 34px; }
.nav-button { color: var(--deep); border: 1px solid transparent; min-height: 58px; font-size: 15px; }
.nav-button.active {
  color: var(--deep);
  background: #d9f2e7;
  border-color: #ccebdd;
  box-shadow: inset 4px 0 0 #0c7459;
  font-weight: 700;
}
.nav-button:hover:not(.active) { background: #eef9f3; color: var(--deep); }
.side-motto { color: #40705b; }
.side-caption { color: #63796d; }
.side-campus { opacity: 1; height: 245px; left: -20px; right: -20px; bottom: 0; background: linear-gradient(to bottom, #fff 0%, #ffffff00 22%), url('/assets/campus-garden.webp') center bottom / cover no-repeat; }
.side-bottom { justify-content: flex-end; padding: 20px 8px 255px; }
.side-motto { font-size: 19px; line-height: 1.7; }
.side-caption { font-size: 12px; }
.side-version { margin-top: 16px; }
.workspace { margin-left: var(--sidebar); width: calc(100% - var(--sidebar)); padding: 0 28px 20px; }
.topbar { margin: 0 -28px 12px; padding: 12px 28px; min-height: 76px; height: 76px; border: 0; border-bottom: 1px solid #e1eee9; border-radius: 0; background: #effaf6; box-shadow: none; }
.search-trigger { background: #fff; border-color: var(--line); border-radius: 14px; color: var(--muted); height: 44px; width: min(550px, 48%); }
.search-trigger:hover { background: #f0f6f1; border-color: #b6cdbd; }
.group-control { border-color: var(--line); background: #fff; border-radius: 8px; min-height: 44px; }
.account-button .avatar { background: #e6f2e9; color: var(--green); box-shadow: inset 0 0 0 1px #d9e9dd; }
.icon-button { border-radius: 10px; }
.icon-button:hover { background: var(--light); color: var(--green); }
.footer { color: #63786e; }
.footer button:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }

/* One visual hierarchy for the shared page headers and workspace tabs. */
.studio-top h1 { font-weight: 750; letter-spacing: 0; font-size: 30px; }
.studio-shell { padding: 2px 0 10px; }
.studio-top { position: relative; min-height: 82px; }
.studio-header-note { position: absolute; right: 180px; bottom: -24px; width: 310px; height: 100px; pointer-events: none; background: url('/assets/garden-leaves.svg') left bottom / 75px 100px no-repeat; }
.studio-header-note span { display: block; padding-left: 70px; transform: rotate(-6deg); font: 18px/1.8 "Kaiti SC", "STKaiti", serif; letter-spacing: 2px; color: #537d70; }
.studio-header-note::after { content: ""; position: absolute; left: 55px; right: 5px; bottom: 9px; height: 16px; border-top: 2px solid #8bbda4; border-radius: 50%; transform: rotate(-7deg); }
.studio-kicker { font-size: 12px; }
.studio-example-action { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.studio-example-action .btn { min-height: 38px; padding: 7px 12px; background: #fff; color: var(--deep); }
.studio-example-action .btn:hover { background: #eaf7f1; }
.studio-modes { border-bottom-color: #cde4da; margin: 0 0 8px; }
.studio-modes button { color: #5f7268; font-size: 16px; border-radius: 8px 8px 0 0; }
.studio-modes button:hover { color: var(--green); background: #eaf3ed80; }
.studio-modes button.active { color: var(--deep); font-weight: 700; border-bottom-color: var(--green); background: transparent; }
.head-row :is(h1, .content-title) { letter-spacing: -.02em; }
.card { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--visual-shadow-soft); }
.card-head { border-bottom-color: #e6ede7; }

/* Controls remain real native inputs and buttons, including disabled states. */
.btn { border-color: #cddfd9; border-radius: var(--visual-radius-control); font-weight: 600; box-shadow: 0 1px 2px #203b2e04; }
.btn:hover:not(:disabled) { background: #f2f7f3; border-color: #aec9b7; color: var(--deep); box-shadow: 0 3px 8px #214c380a; }
.btn.primary { background: linear-gradient(135deg, #14745e, #075340); border-color: var(--deep); color: #fff; box-shadow: 0 3px 8px #176b5514; }
.btn.primary:hover:not(:disabled) { background: #125740; border-color: #125740; color: white; }
.btn.small { border-radius: 8px; }
.head-actions > .btn { min-height:38px; font-size:13px; }
.btn.text { box-shadow: none; font-weight: 500; }
.btn.text:hover:not(:disabled) { background: #edf5ef; }
.btn.danger { color: #a54f46; background: #fff7f5; border-color: #efdad5; }
.btn:disabled { box-shadow: none; }
.pill { border-color: var(--line); font-weight: 500; }
.pill.green { color: #27684e; border-color: #d3e6d9; background: #eaf5ed; }
.pill.orange { color: #93612e; border-color: #efdcc0; background: #fff5e7; }
.pill.red { color: #a34942; border-color: #efd5d1; background: #fff1ee; }
.field label, label.field { color: #2a4a3a; font-weight: 600; }
.field input, .field textarea, .field select,
.modal input:not([type=checkbox]):not([type=radio]), .modal textarea, .modal select {
  background: #fcfdfb;
  border-color: #d7e3d9;
  border-radius: var(--visual-radius-control);
  color: var(--ink);
  box-shadow: inset 0 1px 2px #233d3003;
}
.field small { font-weight: 400; color: var(--muted); }
input::placeholder, textarea::placeholder { color: #79877e; opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--green); }
.check-label { color: #4b6656; line-height: 1.65; }
.notice { border-radius: 12px; line-height: 1.75; }
.notice.green { background: #edf5ef; color: #486c55; border-color: #d9e7dc; }
button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #42916f;
  outline-offset: 3px;
}

/* Modal surfaces share the same finish as pages without altering their dialogs. */
.modal-shade { background: #17332966; backdrop-filter: blur(4px); }
.modal { border-color: #e1eae1; border-radius: 16px; box-shadow: 0 24px 80px #122d2933; }
.modal-head { background: #f8faf6; border-bottom-color: #e2eae2; }
.modal-head h2 { color: var(--deep); font-weight: 650; }
.modal-footer { background: #f9fbf7; border-top-color: #e2eae2; }
.role-choice { border-color: var(--line); border-radius: 12px; }
.role-choice:hover { background: #edf6ef; border-color: #b4d1be; }
.account-summary { background: #eef5ed; border: 1px solid #dfeadf; }
.empty { color: var(--muted); }
#toast { border-radius: 12px; box-shadow: 0 8px 28px #173b2926; }

@media (max-width: 760px) {
  .studio-header-note { display: none; }
  .workspace { margin: 0; width: 100%; padding: 0 12px 75px; }
  .topbar { margin: 0 -12px 12px; padding: 8px 12px; border-radius: 0; }
  .studio-shell { padding: 6px 0 12px; }
  .studio-modes button { font-size: 13px; }
  .studio-top { min-height:60px; align-items: flex-start; gap: 8px; }
  .studio-example-action { margin-left: auto; }
  .studio-example-action .btn { min-height: 34px; padding: 5px 9px; font-size: 11px; }
  .mobile-bottom { background: #fffffff5; border-top-color: #dfe9e0; box-shadow: 0 -4px 20px #21463107; }
  .mobile-bottom button { color: #61756a; }
  .mobile-bottom button[aria-current=page] { color: var(--green); background: #eef6ef; border-radius: 12px; }
  .modal { border-radius: 8px; }
  .modal-head, .modal-body { padding-left: 18px; padding-right: 18px; }
}
@media (prefers-reduced-motion: reduce) { .modal-shade { backdrop-filter: none; } }
@media print { .sidebar, .topbar, .card, .modal { box-shadow: none; } }

@media (min-width: 761px) and (max-width: 1200px) { .studio-header-note { display:none; } }

.workspace:not(:has(.studio-shell)) .mode-strip { min-height:24px; padding:0 2px; margin:0 0 4px; }
