/* Warm surfaces and restrained reveal motion, informed by open-claude-ui.
   Repository and MIT attribution: research/open-claude-ui-reference.json. */
:root {
  --ink: #302e29;
  --muted: #706b61;
  --green: #a44b32;
  --green-deep: #843a27;
  --pale: #f4e9df;
  --bg: #f8f7f3;
  --line: #e5e1d8;
  --radius: 14px;
  --shadow: 0 2px 10px #30251504;
  --motion-out: cubic-bezier(0.16, 1, 0.3, 1);
}
body {
  background: var(--bg);
}
.rail {
  background: #f0eee7;
  border-color: #e5e1d8;
}
.brand-mark {
  background: #b65a3e;
  color: #fff;
  border-radius: 11px;
}
.topbar {
  background: #f8f7f3eb;
  border-color: var(--line);
}
.nav {
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s var(--motion-out);
}
.nav.active {
  background: #e8e2d6;
  color: #4c3e2e;
}
.nav:hover {
  background: #e8e5dc;
}
.button {
  border-color: #d7d1c5;
  box-shadow: 0 1px 2px #30251505;
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.18s var(--motion-out),
    box-shadow 0.18s;
}
.button:hover:not(:disabled) {
  background: #f2eee6;
  border-color: #c7bdad;
}
.button.primary {
  background: #a44b32;
  border-color: #a44b32;
  color: #fff;
}
.button.primary:hover:not(:disabled) {
  background: #8c3d28;
  border-color: #8c3d28;
}
.button:active:not(:disabled) {
  transform: scale(0.975);
}
.button:focus-visible,
.nav:focus-visible,
summary:focus-visible {
  outline-color: #ad573b;
}
.page.active {
  animation: studio-reveal 0.3s var(--motion-out) both;
}
dialog[open] {
  animation: studio-dialog 0.25s var(--motion-out) both;
}
dialog::backdrop {
  background: #27221b52;
  backdrop-filter: blur(3px);
}
.eyebrow {
  color: #986044;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.planner-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  background: #f2eee4;
  border-color: #e4ddce;
}
.planner-start h2 {
  margin: 7px 0 8px;
  font-size: 25px;
  letter-spacing: -0.5px;
  font-weight: 600;
}
.planner-start p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.planner-start .button {
  white-space: nowrap;
  padding: 12px 20px;
}
.planner-start .button span {
  margin-left: 12px;
}
.planner-options {
  margin-top: 16px;
  padding: 17px 22px;
}
.planner-options summary,
.planner-period summary,
.planner-record summary,
.legacy-search > summary {
  font-weight: 600;
  cursor: pointer;
}
.planner-options > p,
.planner-period > p,
.planner-record > p {
  color: var(--muted);
  margin-top: 16px;
}
.planner-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.planner-option-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.planner-option-grid label.check {
  grid-column: 1/-1;
  flex-direction: row;
}
.planner-option-grid select,
#planner-days,
#planner-period-day {
  min-height: 40px;
  border: 1px solid #d7d1c5;
  background: #fffdf9;
  border-radius: 8px;
  padding: 7px 10px;
}
.planner-results {
  margin-top: 30px;
}
.planner-result-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.planner-result-heading h2 {
  font-size: 19px;
  margin: 0;
}
.planner-result-heading > span {
  color: var(--muted);
  font-size: 13px;
}
.planner-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 24px;
}
.planner-choice {
  text-align: left;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  transition:
    border-color 0.18s,
    background 0.18s,
    transform 0.25s var(--motion-out);
  animation: studio-reveal 0.35s var(--motion-out) both;
}
.planner-choice:nth-child(2) {
  animation-delay: 40ms;
}
.planner-choice:nth-child(3) {
  animation-delay: 80ms;
}
.planner-choice:hover:not(:disabled) {
  border-color: #bc9a80;
  transform: translateY(-2px);
}
.planner-choice.selected {
  border-color: #b56d4b;
  background: #fcf8f1;
  box-shadow: inset 0 0 0 1px #b56d4b;
}
.choice-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 17px;
}
.choice-top i {
  font-style: normal;
  border: 1px solid #d8d1c4;
  border-radius: 50%;
  width: 21px;
  height: 21px;
  line-height: 19px;
  text-align: center;
  color: transparent;
  font-size: 13px;
}
.selected .choice-top i {
  background: #a44b32;
  border-color: #a44b32;
  color: #fff;
}
.choice-purpose {
  color: var(--muted);
  font-size: 13px;
  margin-top: 9px;
}
.choice-check {
  color: #875523;
  font-size: 12px;
  margin-top: 12px;
}
.choice-main {
  font-size: 34px;
  line-height: 1.3;
  margin: 25px 0 17px;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.choice-main small {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 7px;
}
.choice-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  font-size: 13px;
  color: var(--muted);
}
.planner-schedule {
  padding: 24px 28px;
}
.planner-schedule-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}
.planner-schedule-heading h2 {
  font-size: 21px;
  margin-bottom: 6px;
}
.planner-schedule-heading p {
  color: var(--muted);
  margin: 0;
}
.planner-schedule table {
  width: 100%;
  border-collapse: collapse;
}
.planner-schedule th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  background: #f6f4ee;
}
.planner-schedule th,
.planner-schedule td {
  padding: 12px 16px;
  border-bottom: 1px solid #eeeae1;
}
.planner-schedule tr:last-child td {
  border-bottom: 0;
}
.schedule-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.grade-chip {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}
.grade-0 {
  background: #e4ecf3;
  color: #365775;
}
.grade-1 {
  background: #f5e7df;
  color: #8a4b32;
}
.grade-2 {
  background: #f2e7d1;
  color: #705525;
}
.planner-period,
.planner-record {
  margin-top: 17px;
  padding: 20px 24px;
}
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
#planner-period-output {
  margin-top: 18px;
}
.planner-record table td,
.planner-period table td {
  font-variant-numeric: tabular-nums;
}
.legacy-search {
  margin-top: 26px;
  padding: 20px 24px;
}
.legacy-search > .search-setup {
  margin-top: 25px;
}
.empty-schedule {
  display: grid;
  gap: 9px;
  width: 70px;
  margin: 12px auto 25px;
}
.empty-schedule i {
  display: block;
  height: 5px;
  border-radius: 4px;
  background: #d4c8b6;
}
.empty-schedule i:nth-child(2) {
  width: 75%;
}
.empty-schedule i:nth-child(3) {
  width: 85%;
}
@keyframes studio-reveal {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes studio-dialog {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (max-width: 900px) {
  .planner-option-grid {
    grid-template-columns: 1fr 1fr;
  }
  .planner-choice {
    padding: 16px;
  }
  .choice-main {
    font-size: 29px;
  }
  .choice-main small {
    display: block;
    margin-left: 0;
    margin-top: 3px;
  }
}
@media (max-width: 600px) {
  .planner-start {
    flex-direction: column;
    align-items: stretch;
    padding: 23px;
    gap: 20px;
  }
  .planner-start h2 {
    font-size: 23px;
  }
  .planner-choices {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .planner-choice {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 17px;
    gap: 8px 12px;
  }
  .choice-top {
    grid-column: 1;
    font-size: 16px;
  }
  .choice-top i {
    display: none;
  }
  .choice-purpose {
    grid-column: 1;
    font-size: 12px;
    margin: 0;
  }
  .choice-main {
    grid-column: 2;
    grid-row: 1/3;
    text-align: right;
    margin: 0;
    font-size: 28px;
  }
  .choice-main small {
    font-size: 12px;
  }
  .choice-metrics {
    grid-column: 1/-1;
    margin-top: 8px;
  }
  .planner-result-heading {
    display: block;
  }
  .planner-result-heading > span {
    display: block;
    margin-top: 5px;
  }
  .planner-schedule {
    padding: 19px 15px;
  }
  .planner-schedule-heading {
    flex-direction: column;
    gap: 16px;
  }
  .planner-schedule-heading p {
    font-size: 13px;
  }
  .planner-schedule th,
  .planner-schedule td {
    padding: 11px 8px;
    white-space: nowrap;
  }
  .planner-options,
  .planner-period,
  .planner-record,
  .legacy-search {
    padding: 17px;
  }
  .planner-option-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
