/* Deep ocean surfaces. Printed pages are styled separately in method.css. */
@media screen {
  :root {
    color-scheme: dark;
    --paper: #091f48;
    --sidebar: #0a214c;
    --surface: #163566;
    --ink: #f4f7ff;
    --muted: #c1cde1;
    --rule: #365582;
    --edge: #708aae;
    --green: #b7cfff;
    --green-deep: #e1eaff;
    --tint: #254879;
    --mint: #d3e2ff;
    --red: #ffafb7;
    --ocean-primary: linear-gradient(135deg,#365fbb,#2853a4);
    --ocean-secondary: linear-gradient(135deg,rgb(106 142 201 / .34),rgb(84 118 178 / .19));
    --ocean-shine: inset 0 1px 3px rgb(191 212 255 / .19), 0 4px 11px -6px rgb(1 11 34 / .38);
    --glass-face: linear-gradient(125deg,rgb(57 91 151 / .82),rgb(31 62 119 / .69) 56%,rgb(30 59 113 / .8));
    --glass-rim: inset 0 2px 6px -2px rgb(187 210 255 / .37),inset 0 -3px 8px -4px rgb(0 10 39 / .43),0 9px 23px -10px rgb(0 9 32 / .57);
  }
  body {
    min-height: 100vh;
    color: var(--ink);
    background-color: var(--paper);
    background-image: linear-gradient(120deg,#071d43 2%,#0a285b 41%,#123b7e 80%,#183f80 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
  }
  body::after, .hero-weave, .hero-card::before, .hero-card::after { content: none; display: none; }
  .sidebar, .sidebar > .brand, .topbar { background: transparent; border: 0; }
  .sidebar { background-color: rgb(5 22 52 / .18); }
  .sidebar .brand, .topbar-title { color: var(--ink); }
  .brand-mark, .mini-icon, .week-preview > .row svg { color: var(--green); }
  .topbar { color: var(--muted); }
  .sidebar-foot { border: 0; }
  main:focus { outline: none; }
  :where(a,button,input,textarea,select,summary):focus-visible {
    outline: 3px solid #ffdc8a; outline-offset: 3px;
  }
  .skip { color: #0d2f66; background: #fff; }

  #nav { background: #213e71; box-shadow: var(--glass-rim); border: 0; }
  #nav .navlink { color: #e1e9fa; }
  #nav::before {
    background: linear-gradient(136deg,rgb(79 114 185 / .74),rgb(59 93 161 / .68) 65%,rgb(57 91 158 / .76));
    box-shadow: inset 0 2px 5px -2px rgb(213 228 255 / .44),0 2px 7px rgb(4 17 45 / .2);
  }
  #nav .navlink[aria-current="page"] { color: #fff; background: #3c6098; }
  #nav.lens-ready .navlink[aria-current="page"] { background: transparent; }
  #nav .navlink:focus-visible { outline-color: #ffdc8a; outline-offset: -3px; }

  .panel, .method-page {
    border: 0;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 8px 26px -16px rgb(0 10 36 / .45);
  }
  .method-page { padding: var(--panel-space); }
  .feature.hero-card {
    border: 0;
    background: linear-gradient(118deg,#113473 0%,#17458d 58%,#204c9c 100%);
    color: #fff; box-shadow: 0 10px 24px -16px rgb(2 10 34 / .48);
  }
  .hero-copy h2 { color: #fff; text-shadow: none; }
  .hero-copy .eyebrow, .feature .eyebrow { color: #c3d6ff; }
  .hero-copy > p:not(.eyebrow), .feature .lead, .feature .note, .feature small { color: #e1eaff; }
  .mini-icon, .done-word { color: #deebff; background: #294d83; border: 0; }
  .goal-card, .goal-fields, .check-group, .day-plan, .cycle-item, .week-caption,
  .pe-fields, .pe-activity + .pe-activity, .control-list > *, .step-list > li,
  .energy-day-list li, .energy-ranking li, .cal-stat > div, .cal-entry, .method-step {
    border: 0;
  }
  .goal-card + .goal-card, .cal-entry + .cal-entry, .pe-fields + .pe-fields { margin-top: .5rem; }
  .stored-note { border: 0; padding: .8rem 1rem; border-radius: 12px; background: #1d4074; }
  .method-paper { background: #214377; color: var(--ink); }
  .method-intro, .method-note, .cal-hint { color: var(--muted); }
  .method-next, .method-stamp, .method-source, .step-list li::before, .energy-status b { color: var(--green); }
  .pe-schedule td, .pe-schedule th { border-color: #345383; }
  .panel.error, .error, [role="alert"]:not(:empty) { color: var(--red); }

  .button.primary, .method-action, dialog button[type="submit"].primary,
  .feature .hero-copy .button.light {
    background: var(--ocean-primary); border: 1px solid rgb(164 191 251 / .28);
    color: #fff; box-shadow: var(--ocean-shine);
  }
  .feature .hero-copy .button.light { background: linear-gradient(139deg,rgb(76 114 188 / .8),rgb(43 77 147 / .86)); }
  .button.subtle, .feature .hero-copy .button.light[data-action="plan"], .calendar-head .cal-nav,
  .calendar-head button, .energy-repeat, .month-strip button {
    background: var(--ocean-secondary); border: 1px solid rgb(156 184 234 / .22); color: #f1f5ff; box-shadow: var(--ocean-shine);
  }
  .button.text-link, .text-link.button { color: var(--green); background: transparent; border: 0; box-shadow: none; }
  .button:disabled, .icon-button:disabled { opacity: .63; }
  .toast { color: #fff; background: #244b87; box-shadow: 0 6px 15px rgb(0 12 38 / .38); }

  .week-col > span, .week-date[disabled], .calendar-grid .cal-day:disabled:not(.today), .calendar-grid .cal-day.outside { color: #bac9df; }
  .week-date.current:not(.marked) { color: white; background: #2c528d; outline-color: #9dc0ff; }
  .week-date.marked, .calendar-grid .cal-day.done { color: #fff; background: #325faa; }
  .week-date.marked.current { box-shadow: inset 0 0 0 2px #cbdcff; }
  .calendar-grid button.cal-day { border-color: #476690; color: var(--ink); background: #1c3d70; }
  .calendar-grid .cal-day.planned { color: #d4dfef; background: #213f70; }
  .calendar-grid button.cal-day.done { background: #315da8; color: #fff; }
  .calendar-grid .cal-day.today:not(.done) { color: #fff; background: #304f83; }
  .calendar-grid button.cal-day.today { border-color: #a9c9ff; outline: 1px solid #a9c9ff; }
  .calendar-grid .cal-day.selected { outline: 2px solid #cbdcff; }
  .calendar-grid button.cal-day:focus-visible, .week-date:focus-visible,
  .method-action:focus-visible, .method-source:focus-visible, .cal-entry summary:focus-visible,
  .energy-day:focus-visible, .energy-repeat:focus-visible, .energy-shortcuts summary:focus-visible {
    outline: 3px solid #ffdc8a;
  }
  .feature :is(button,a):focus-visible { outline-color: #ffdc8a; }
  .month-strip button[aria-pressed="true"], .month-strip button[aria-current], .month-strip button.selected,
  .energy-repeat[aria-pressed="true"], .check-line.major { color: #f5f8ff; background: #31558d; }
  .month-strip button[aria-pressed="true"], .month-strip button[aria-current], .month-strip button.selected,
  .energy-repeat[aria-pressed="true"] { border-color: #a1bee8; }

  #editor { background: #122e59; border: 0; box-shadow: var(--glass-rim), 0 24px 70px rgb(1 7 28 / .51); }
  #editor .dialog-head { background: #122e59; border: 0; }
  #editor .dismiss { color: #f1f6ff; background: #2c4b79; border: 0; }
  #editor::backdrop { background: rgb(0 8 26 / .63); }
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select, .method-month-control select {
    color-scheme: dark; color: #f6f8ff; background: #0d254a; border: 1px solid #718daf;
  }
  input::placeholder, textarea::placeholder { color: #afc0d8; }
  textarea:focus-visible, input:focus-visible, select:focus-visible { outline-color: #ffdc8a; }
  input[type="checkbox"], input[type="radio"] { accent-color: #98bcff; }
}
@supports ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))) {
  @media screen {
    #nav { background: var(--glass-face); }
    /* glass.css owns refraction at the edge and the motion of the active tab. */
    #editor { background: linear-gradient(145deg,rgb(21 48 90 / .96),rgb(15 40 77 / .97)); }
    #editor .dialog-head { background: rgb(20 46 86 / .96); }
    .feature .hero-copy .button.light { -webkit-backdrop-filter: saturate(115%) blur(7px); backdrop-filter: saturate(115%) blur(7px); }
  }
}
@media screen and (max-width:750px) {
  .sidebar > .brand, .topbar { background: transparent; border: 0; }
  .sidebar > .brand { color: #fff; }
  .topbar { color: var(--muted); }
}
@media screen and (hover:hover) {
  #nav .navlink:not([aria-current]):hover { background: rgb(125 153 212 / .2); color: white; }
  .button.subtle:hover:not(:disabled), .calendar-head button:hover:not(:disabled),
  .icon-button:hover:not(:disabled), .button.text-link:hover, .energy-repeat:hover,
  .feature .hero-copy .button.light[data-action="plan"]:hover { color: #fff; background: #31568b; }
  .button.primary:hover:not(:disabled), .method-action:hover, dialog button[type="submit"].primary:hover,
  .feature .hero-copy .button.light:hover:not(:disabled) { color: #fff; background: #3c63ac; }
}
@media screen and (prefers-reduced-motion:reduce) {
  #nav::before { transition: none; }
}
@media screen and (prefers-reduced-transparency:reduce), screen and (prefers-contrast:more) {
  body { background: #0a2450; }
  .feature.hero-card { background: #173c79; }
  #nav, #nav.edge-optics, #editor, #editor .dialog-head {
    background: #183664; color: var(--ink); border: 0; box-shadow:none;
    -webkit-backdrop-filter:none; backdrop-filter:none;
  }
  #nav .navlink[aria-current="page"], #nav.lens-ready .navlink[aria-current="page"] { color:#fff; background:#365b95; outline:1px solid #baceec; }
  .button.subtle, .calendar-head button, .energy-repeat, .month-strip button, .feature .hero-copy .button.light[data-action="plan"] {
    background:#294c81; color:#fff; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none;
  }
  .button.primary, .method-action, .feature .hero-copy .button.light, dialog button[type="submit"].primary {
    background:#2d549e; color:#fff; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none;
  }
  .panel { box-shadow:none; }
}
@media screen and (prefers-contrast:more) {
  :root { --ink:#fff; --muted:#e3edff; --edge:#bdd4fa; --rule:#87a1c9; }
  .calendar-grid button.cal-day, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select, .method-month-control select { border-color:#b4c9eb; }
  .button:not(.text-link), #nav { border:1px solid #b4c9eb; }
}
@media screen and (forced-colors:active) {
  :root { color-scheme:light dark; }
  body, .sidebar, .feature.hero-card, .panel, .method-page, #nav, #nav.edge-optics, #editor, #editor .dialog-head {
    background:Canvas; color:CanvasText; border-color:CanvasText; box-shadow:none;
    -webkit-backdrop-filter:none; backdrop-filter:none;
  }
  #nav::before { display:none; }
  .hero-copy h2, .hero-copy .eyebrow, .hero-copy > p:not(.eyebrow) { color:CanvasText; }
  #nav.lens-ready .navlink[aria-current="page"], #nav .navlink[aria-current="page"] { color:HighlightText; background:Highlight; }
  .button, .method-action, .feature .hero-copy .button.light, .feature .hero-copy .button.light[data-action="plan"] {
    color:ButtonText; background:ButtonFace; border:1px solid ButtonText; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none;
  }
  :where(a,button,input,textarea,select,summary):focus-visible { outline-color: Highlight; }
}

