:root {
  --forest: #12382e;
  --forest-deep: #09261f;
  --mint: #dce9df;
  --lime: #cfe479;
  --paper: #f6f4ec;
  --cream: #fdfcf8;
  --ink: #18322b;
  --muted: #64716a;
  --line: #d9ded5;
  --soft-line: #e8ebe3;
  --danger: #a93d2a;
  --shadow: 0 18px 55px rgba(21, 49, 39, 0.09);
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 5%, rgba(207, 228, 121, 0.22), transparent 23rem),
    linear-gradient(180deg, #eef3ed 0, var(--paper) 29rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

button, input { font: inherit; }
button { cursor: pointer; }

.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-actions { display: flex; align-items: center; gap: 9px; }
.logout-button { padding: 5px 9px; color: #587065; border: 1px solid rgba(18, 56, 46, .16); border-radius: 999px; background: rgba(255, 255, 255, .55); font-size: .75rem; font-weight: 700; }
.logout-button:hover { color: var(--forest); background: #fffefa; }

.login-main { max-width: 520px; min-height: calc(100vh - 92px); display: grid; align-content: center; padding-top: 0; padding-bottom: 86px; }
.login-panel { padding: clamp(28px, 6vw, 44px); }
.login-panel h1 { margin-bottom: 14px; font-size: clamp(2.6rem, 10vw, 4.4rem); }
.login-copy { margin-bottom: 27px; color: var(--muted); }
.login-panel label { display: block; margin-bottom: 7px; color: #50645a; font-size: .83rem; font-weight: 700; }
.login-panel input { width: 100%; min-height: 47px; border: 1px solid #cfd7cc; border-radius: 10px; padding: 0 11px; color: var(--ink); background: #fffefa; outline: none; }
.login-panel input:focus { border-color: #497c60; box-shadow: 0 0 0 3px rgba(76,132,98,.14); }
.login-error { min-height: 1.3em; margin: 13px 0 0; color: var(--danger); font-size: .86rem; font-weight: 650; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--forest);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.1rem;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--forest);
  border-radius: 50% 50% 50% 10%;
  font-size: 0.92rem;
}

.prototype-badge, .step-count, .hole-chip, .watch-count {
  border: 1px solid rgba(18, 56, 46, 0.16);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--forest);
}

main { max-width: 1180px; margin: 0 auto; padding: 12px 28px 56px; }

.hero { max-width: 730px; padding: 50px 0 48px; }
.eyebrow { margin: 0 0 8px; color: #4d7a5f; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.7rem, 7vw, 5.4rem); letter-spacing: -0.068em; line-height: 0.93; font-weight: 500; }
h2 { margin-bottom: 0; letter-spacing: -0.04em; font-size: 1.35rem; line-height: 1.1; }
.hero-copy { max-width: 590px; margin-bottom: 24px; color: #52645b; font-size: 1.1rem; }
.hero-details { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-details span { padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.62); border: 1px solid var(--line); color: #486157; font-size: .82rem; }

.app-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr); gap: 24px; align-items: start; }
.panel { background: rgba(253,252,248,.92); border: 1px solid rgba(18,56,46,.1); border-radius: var(--radius); box-shadow: var(--shadow); }
.watch-panel { padding: clamp(21px, 4vw, 36px); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 29px; }
.compact-heading { margin-bottom: 17px; }
.step-count { color: var(--muted); white-space: nowrap; }

fieldset { border: 0; padding: 0; margin: 0; }
.form-section { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--soft-line); }
.form-section:first-of-type { padding-top: 0; margin-top: 0; border-top: none; }
legend { margin-bottom: 5px; padding: 0; font-weight: 800; letter-spacing: -.02em; }
.field-help { margin-bottom: 14px; color: var(--muted); font-size: .86rem; }
.course-groups { display: grid; gap: 9px; }
.course-group { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fffefa; }
.course-group summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 11px 14px; font-size: .9rem; font-weight: 750; cursor: pointer; }
.course-group summary::-webkit-details-marker { display: none; }
.course-group summary::after { content: "+"; order: 3; color: #547266; font-size: 1.15rem; font-weight: 500; }
.course-group[open] summary::after { content: "–"; }
.summary-count { margin-left: auto; color: var(--muted); font-size: .76rem; font-weight: 600; }
.course-option { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 11px 14px 11px 16px; border-top: 1px solid var(--soft-line); cursor: pointer; transition: background .16s ease; }
.course-option:hover { background: #f1f7ef; }
.course-option input { position: absolute; opacity: 0; pointer-events: none; }
.course-option.is-filtered { display: none; }
.course-option.is-selected { background: #edf6e8; }
.course-option.is-selected .course-check { background: var(--forest); border-color: var(--forest); }
.course-option.is-selected .course-check::after { opacity: 1; }
.course-check { width: 19px; height: 19px; position: relative; border: 1.5px solid #a7b2a9; border-radius: 6px; background: white; transition: all .16s ease; }
.course-check::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0; }
.course-name { font-size: .91rem; }
.hole-chip { padding: 3px 7px; border-color: #dfe6d8; color: #68766b; background: #f6f8f3; font-size: .7rem; }

.segmented-control { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 330px; padding: 3px; gap: 3px; border-radius: 11px; background: #e7ece5; }
.segmented-control label { position: relative; text-align: center; }
.segmented-control input { position: absolute; opacity: 0; }
.segmented-control span { display: block; padding: 8px 7px; color: #617069; border-radius: 8px; font-size: .83rem; font-weight: 700; transition: all .15s ease; }
.segmented-control input:checked + span { background: white; color: var(--forest); box-shadow: 0 1px 5px rgba(18,56,46,.1); }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field-grid label { display: block; margin-bottom: 7px; font-size: .83rem; color: #50645a; font-weight: 700; }
input[type="date"], input[type="time"] { width: 100%; min-height: 45px; border: 1px solid #cfd7cc; border-radius: 10px; padding: 0 10px; color: var(--ink); background: #fffefa; outline: none; }
input[type="date"]:focus, input[type="time"]:focus { border-color: #497c60; box-shadow: 0 0 0 3px rgba(76,132,98,.14); }
.form-error { margin: 16px 0 0; color: var(--danger); font-size: .88rem; font-weight: 650; }
.primary-button, .secondary-button, .text-button { border: 0; font-weight: 800; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin-top: 24px; padding: 14px 18px; border-radius: 12px; color: white; background: var(--forest); box-shadow: 0 7px 15px rgba(18,56,46,.18); transition: transform .16s ease, background .16s ease; }
.primary-button:hover { background: var(--forest-deep); transform: translateY(-1px); }
.primary-button span { font-size: 1.12rem; }

.sidebar { display: grid; gap: 18px; }
.notification-card { padding: 22px; color: #f7faef; background: var(--forest); border-radius: var(--radius); box-shadow: var(--shadow); }
.notification-icon { width: 31px; height: 31px; margin-bottom: 22px; display: grid; place-items: center; background: var(--lime); color: var(--forest-deep); border-radius: 50%; font-weight: 900; }
.notification-card .eyebrow { color: #b9d4b6; }
.notification-card h2 { font-size: 1.25rem; }
.notification-card p:not(.eyebrow) { margin: 8px 0 16px; color: #d5e4d4; font-size: .89rem; }
.secondary-button { width: 100%; padding: 11px 13px; border-radius: 10px; background: var(--lime); color: var(--forest-deep); }
.secondary-button:hover { background: #dcee91; }
.saved-panel, .alerts-panel { padding: 23px; }
.watch-count { min-width: 27px; text-align: center; background: #edf4e9; border-color: #dce7d5; }
.watches { display: grid; gap: 9px; }
.empty-state { margin: 0; padding: 19px 8px 8px; color: var(--muted); text-align: center; font-size: .88rem; }
.watch-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; }
.watch-card-top { display: flex; justify-content: space-between; gap: 12px; }
.watch-card h3 { margin: 0; font-size: .95rem; line-height: 1.25; }
.watch-card p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; }
.watch-card-bottom { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 13px; }
.text-button { padding: 6px 8px; border-radius: 7px; color: #316044; background: #eef5eb; font-size: .74rem; }
.text-button:hover { background: #dcead7; }
.text-button.delete-button { color: #8f382c; background: #fbefec; }
.text-button.delete-button:hover { background: #f6dfda; }
.alerts { display: grid; gap: 9px; }
.alert-card { padding: 13px 14px; border: 1px solid #dce6d6; border-radius: 12px; background: #f3f8ef; }
.alert-card h3 { margin: 0; font-size: .92rem; }
.alert-card p { margin: 4px 0 0; color: #4d6757; font-size: .8rem; }
.alert-dot { display: inline-block; width: 7px; height: 7px; margin: 0 6px 1px 0; border-radius: 50%; background: #70a154; }

.how-it-works { padding: 6px 8px 2px; }
.how-it-works h2 { margin-bottom: 14px; font-family: Georgia, "Times New Roman", serif; font-size: 1.47rem; font-weight: 500; }
.how-it-works ol { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; counter-reset: steps; }
.how-it-works li { display: grid; grid-template-columns: 26px 1fr; gap: 9px; align-items: start; color: #58685f; font-size: .84rem; }
.how-it-works li::before { counter-increment: steps; content: counter(steps); width: 23px; height: 23px; display: grid; place-items: center; color: var(--forest); background: var(--mint); border-radius: 50%; font-size: .72rem; font-weight: 800; }

.prototype-note { display: flex; align-items: flex-start; gap: 10px; max-width: 760px; margin: 25px auto 0; padding: 14px 16px; color: #59695f; border: 1px solid #dfe4dc; border-radius: 12px; background: rgba(255,255,255,.46); font-size: .82rem; }
.prototype-note span { flex: 0 0 18px; height: 18px; display: grid; place-items: center; color: #f4f7ed; background: #6d8775; border-radius: 50%; font-family: Georgia, serif; font-weight: 700; }
.prototype-note p { margin: 0; }
.prototype-note strong { color: var(--forest); }
.toast { position: fixed; z-index: 5; right: 22px; bottom: 22px; max-width: min(370px, calc(100vw - 44px)); padding: 13px 16px; color: white; background: #143b30; border-radius: 12px; box-shadow: 0 12px 28px rgba(0,0,0,.2); font-size: .88rem; font-weight: 650; }

@media (max-width: 820px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .saved-panel { grid-column: span 2; }
}

@media (max-width: 590px) {
  .site-header { padding: 17px 18px; }
  main { padding: 5px 18px 42px; }
  .prototype-badge { display: none; }
  .logout-button { padding: 5px 8px; }
  .hero { padding: 35px 0 31px; }
  .hero-copy { font-size: 1rem; }
  .watch-panel, .saved-panel, .alerts-panel, .notification-card { border-radius: 16px; }
  .watch-panel { padding: 21px 17px; }
  .panel-heading { margin-bottom: 22px; }
  .step-count { display: none; }
  .course-group summary { padding-left: 12px; padding-right: 12px; }
  .summary-count { display: none; }
  .field-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-section { margin-top: 18px; padding-top: 18px; }
  .sidebar { grid-template-columns: 1fr; gap: 16px; }
  .saved-panel { grid-column: auto; }
  .how-it-works { padding: 5px 2px; }
}
