/* ==================================================================== *
 * WEEKLY STARTER — built on Planerbase 14 "ascent"
 * three screens climbed by scroll: start, notes, the wire
 * ==================================================================== */
:root {
  --paper: #ffffff;
  /* Deckkraft der Notes-Fläche: 1 = deckend, 0 = ganz durchsichtig */
  --paper-opacity: .10;
  --ink:   #0d1218;
  --steel: #8fa4b4;
  --accent: #8fa4b4;            /* design 14 has no warm accent; steel is the highlight */
  --line:  rgba(255,255,255,.18);
  --sans: 'IBM Plex Sans', -apple-system, Helvetica, Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: #060a0f; color: #fff;
  font: 400 13px/1.5 var(--mono); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, textarea, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: #fff; color: #0d1218; }

#bg { position: fixed; inset: 0; z-index: 0; }
.vig { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(4,7,11,.85) 100%); }

.app { position: relative; z-index: 2; height: 100dvh; display: flex; flex-direction: column; }

/* ------------------------------------------------------------ header */
.top { flex: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 16px 22px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.top .mid { text-align: center; color: rgba(255,255,255,.62); line-height: 1.8; }
.top .mid b { display: block; font-weight: 400; color: #fff; letter-spacing: .16em; }
.top .right { display: flex; gap: 12px; align-items: center; justify-content: flex-end; color: rgba(255,255,255,.5); }
.top .right a:hover { color: #fff; }

/* ---------------------------------------------------- settings panel */
.cfg-gear { display: grid; place-items: center; width: 26px; height: 26px;
  border: 1px solid var(--line); color: rgba(255,255,255,.6); transition: all .15s; }
.cfg-gear:hover { color: var(--ink); background: #fff; border-color: #fff; }
.cfg-panel { position: fixed; inset: 0; z-index: 41; display: flex; align-items: center; justify-content: center;
  padding: 5vh 20px; background: rgba(4,7,11,.72); backdrop-filter: blur(3px); }
.cfg-card { width: min(440px, 100%); background: rgba(255,255,255,.07); backdrop-filter: blur(9px);
  border: 1px solid var(--line); box-shadow: 0 40px 90px rgba(0,0,0,.55); }
.cfg-hd { display: flex; align-items: baseline; gap: 16px; padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.cfg-hd h3 { margin: 0; font: 300 clamp(20px, 2.6vw, 30px)/.95 var(--sans); letter-spacing: -.04em; }
.cfg-x { margin-left: auto; font-size: 22px; line-height: 1; color: rgba(255,255,255,.55); }
.cfg-x:hover { color: #fff; }
.cfg-body { padding: 18px 22px 6px; }
.cfg-row { display: block; margin-bottom: 14px; }
.cfg-label { display: block; margin-bottom: 7px; font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(255,255,255,.55); }
.cfg-row input { width: 100%; padding: 10px 12px; background: rgba(255,255,255,.06);
  border: 1px solid var(--line); outline: 0; color: #fff;
  font: 300 clamp(15px, 1.6vw, 18px)/1.3 var(--sans); letter-spacing: -.01em; }
.cfg-row input:focus { border-color: #fff; background: rgba(255,255,255,.1); }
.cfg-switch { display: inline-flex; border: 1px solid var(--line); }
.cfg-switch label { position: relative; cursor: pointer; }
.cfg-row .cfg-switch input { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; }
.cfg-switch span { display: block; padding: 9px 16px; font: 400 10.5px/1 var(--mono); letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,255,255,.55); transition: background .2s, color .2s; }
.cfg-switch label:hover span { color: #fff; }
.cfg-switch input:checked + span { background: #fff; color: var(--ink); }
.cfg-switch input:focus-visible + span { outline: 1px solid #fff; outline-offset: 2px; }
.cfg-hint { display: block; margin-top: 6px; font-size: 10.5px; color: rgba(255,255,255,.4); letter-spacing: .04em; }
.cfg-ft { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px 18px; }
.cfg-btn { padding: 8px 16px; border: 1px solid var(--line); font: 400 10.5px/1 var(--mono);
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.65); transition: all .15s; }
.cfg-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.cfg-btn.cfg-go:hover, .cfg-btn.cfg-go { border-color: rgba(255,255,255,.5); color: #fff; }
.cfg-btn.cfg-go:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ----------------------------------------------------- help drop-down */
.top .right { position: relative; }   /* the drop-down hangs from the header's right edge */
.help-link { text-transform: inherit; letter-spacing: inherit; }   /* buttons ignore the header's caps by default */
.help-link:hover, .help-link[aria-expanded="true"] { color: #fff; }
/* rgba(r,g,b, opacity): opacity 0 = clear … 1 = solid; blur(0) = no frosted glass */
.help-card { background: rgba(120,120,125,0.2); backdrop-filter: blur(0); }       /* card behind the text */
.help-drop { position: absolute; top: calc(100% + 14px); right: 0; z-index: 41;
  width: min(380px, calc(100vw - 44px)); padding: 16px 18px 4px;
  border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.45);
  text-align: left; text-transform: none; letter-spacing: normal; }
.help-drop h3 { margin: 0 0 12px; font: 400 10.5px/1 var(--mono); letter-spacing: .18em;
  text-transform: uppercase; color: var(--steel); }
.help-body p { margin: 0 0 12px; font: 300 14.5px/1.55 var(--sans); letter-spacing: -.01em; color: rgba(255,255,255,.9); }

/* ------------------------------------------------------------- rail */
.rail { flex: 1; min-height: 0; display: flex; flex-direction: column;
  overflow-x: hidden; overflow-y: auto; scroll-snap-type: y mandatory; scroll-behavior: smooth;
  scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; min-width: 0;
  padding: 0 46px 26px; display: flex; flex-direction: column; }

/* ------------------------------------------------------ screen: start */
.start { justify-content: center; }
.start .kicker { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.start h1 { margin: 14px 0 0; font: 700 clamp(48px, 7.5vw, 190px)/.82 var(--sans);
  letter-spacing: -.055em; text-transform: uppercase; }
.start h1 i { font-style: normal; }
.start h1 #who { display: block; color: transparent; -webkit-text-stroke: 1.4px rgba(255,255,255,.6);
  outline: 0; cursor: text; }
.start h1 #who:focus { -webkit-text-stroke-color: var(--accent); }

/* the one line that starts the day */
.first { margin-top: 30px; display: flex; align-items: center; gap: 12px; max-width: 760px;
  border-bottom: 2px solid var(--accent); padding-bottom: 10px; }
.first input { flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font: 300 clamp(17px, 2.4vw, 30px)/1.25 var(--sans); letter-spacing: -.03em; color: #fff; }
.first input::placeholder { color: rgba(255,255,255,.34); }
.first button { flex: 0 0 auto; padding: 9px 15px; border: 1px solid var(--accent); border-radius: 3px;
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); transition: all .18s; }
.first button:hover { background: var(--accent); color: #0d1218; }

.under { margin-top: 30px; display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-end;
  border-top: 1px solid var(--line); padding-top: 18px; }
.under div { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.under div b { display: block; margin-top: 6px; font: 400 26px/1 var(--sans); letter-spacing: -.02em; color: #fff; }
.under div b.big { font-size: clamp(30px, 4.6vw, 62px); font-weight: 300; }
.under div b.warm { color: var(--steel); }

/* how much of the day is left, as a line */
.daybar { margin-top: 16px; max-width: 760px; height: 2px; background: rgba(255,255,255,.16); }
.daybar i { display: block; height: 100%; width: 0; background: var(--accent);
  box-shadow: 0 0 14px var(--accent); transition: width .8s cubic-bezier(.2,.9,.25,1); }

.wise { display: block; margin-top: 26px; max-width: 103ch; text-align: left; cursor: pointer;
  padding-top: 14px; border-top: 1px solid var(--line); color: rgba(255,255,255,.6); transition: color .2s; }
.wise:hover { color: #fff; }
.wise .q { font: 300 clamp(15px, 1.8vw, 21px)/1.5 var(--sans); letter-spacing: -.02em; }
.wise .by { display: block; margin-top: 6px; font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent); }
.wise.joke .by { font-size: 12px; letter-spacing: .12em; }

/* ------------------------------------------------------ screen: notes */
.sheet { padding-block: 20px; }
/* the sheet is glass now, not paper: the panel is 90% see-through and the
   writing is white, so the backdrop reads through without eating the text */
.sheet .frame { flex: 1; min-height: 0; display: flex; flex-direction: column;
  background: rgba(255, 255, 255, var(--paper-opacity));
  backdrop-filter: blur(7px); color: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px rgba(0,0,0,.55); }
.sheet .frame > .hd { display: flex; align-items: flex-end; gap: 18px;
  padding: 20px 26px 14px; border-bottom: 1px solid var(--line); }
.sheet h2 { margin: 0; font: 300 clamp(30px, 5vw, 62px)/.9 var(--sans); letter-spacing: -.045em; }
.sheet .hd .meta { font-size: 11px; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .1em; padding-bottom: 8px; }
.sheet .hd .tools { margin-left: auto; display: flex; gap: 8px; padding-bottom: 6px; }
.mini { padding: 6px 12px; border: 1px solid var(--line); font: 400 10.5px/1 var(--mono);
  letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.62); transition: all .15s; }
.mini:hover, .mini[data-on] { background: #fff; border-color: #fff; color: var(--ink); }
.tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.06); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; flex: 0 0 auto; max-width: 180px; text-align: left; padding: 10px 26px 10px 14px;
  border-right: 1px solid var(--line); color: rgba(255,255,255,.55); font: 400 12px/1.35 var(--mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s, color .15s; }
.tab:hover, .tab[data-on] { background: rgba(255,255,255,.14); color: #fff; }
.tab[data-on]::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: #fff; }
.tab .kill { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); opacity: 0; }
.tab:hover .kill { opacity: .6; }
/* the week's sheets stand in a column on the left, the pad beside them */
.week .split { flex: 1; min-height: 0; display: flex; }
.week .tabs.column { flex: 0 0 210px; flex-direction: column; overflow-x: hidden; overflow-y: auto;
  border-bottom: 0; border-right: 1px solid var(--line); }
/* one line per sheet, ellipsis past the edge — the strip's own behaviour, stood up */
.week .tabs.column .tab { flex: 0 0 auto; max-width: none; width: 100%;
  border-right: 0; border-bottom: 1px solid var(--line); }
.week .tabs.column .tab[data-on]::before { inset: 0 auto 0 0; width: 2px; height: auto; }
.week .tabs.column .tab .kill { top: 12px; transform: none; }

#note, #weeknote { flex: 1; width: 100%; resize: none; border: 0; outline: 0; background: none; padding: 22px 28px;
  color: #fff; caret-color: #fff; font: 400 clamp(14px, 1.75vh, 17px)/1.9 var(--sans); letter-spacing: -.008em;
  text-shadow: 0 1px 12px rgba(6,10,15,.55); }
#note::placeholder, #weeknote::placeholder { color: rgba(255,255,255,.38); }
#note::first-line, #weeknote::first-line { font-weight: 600; }
.sheet .ft { display: flex; gap: 20px; padding: 10px 28px; border-top: 1px solid var(--line);
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.sheet .ft .ok { color: #fff; opacity: 0; transition: opacity .3s; }
.sheet .ft .ok[data-on] { opacity: 1; }

/* ------------------------------------------------------- screen: wire */
.wire { padding-block: 20px; }
.wire .hd { display: flex; align-items: flex-end; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.wire h2 { margin: 0; font: 300 clamp(30px, 5vw, 62px)/.9 var(--sans); letter-spacing: -.045em; }
.wire .hd .meta { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.5); padding-bottom: 8px; }
.wire .hd .tools { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 6px; }
.wire .mini { border-color: var(--line); color: rgba(255,255,255,.6); }
.wire .mini:hover, .wire .mini[data-on] { background: #fff; border-color: #fff; color: var(--ink); }
.list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2c3742 transparent; }
.list::-webkit-scrollbar { width: 8px; }
.list::-webkit-scrollbar-thumb { background: #2c3742; border-radius: 99px; }
.story { display: grid; grid-template-columns: 52px 1fr auto; gap: 18px; align-items: baseline;
  padding: 14px 6px; border-bottom: 1px solid rgba(255,255,255,.1);
  transition: padding-left .18s, background .18s; }
.story:hover { background: rgba(255,255,255,.06); padding-left: 16px; }
.story .n { font-size: 11px; color: rgba(255,255,255,.4); letter-spacing: .1em; }
.story:hover .n { color: #fff; }
.story .txt { min-width: 0; }
.story h3 { margin: 0; font: 400 clamp(15px, 2vh, 20px)/1.3 var(--sans); letter-spacing: -.025em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* one line, never two: the rest is an ellipsis */
.story .desc { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.45);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story:hover .desc { color: rgba(255,255,255,.72); }
.story .tail { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.42); white-space: nowrap; }

/* ---------------------------------------------------------- controls */
.prail { position: fixed; right: 16px; top: 92px; bottom: 92px; width: 2px; z-index: 6; background: rgba(255,255,255,.14); }
.prail i { display: block; width: 100%; height: 0; background: #fff; box-shadow: 0 0 12px rgba(255,255,255,.7); }
.controls { flex: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  padding: 14px 22px 18px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.arrows { display: flex; gap: 10px; }
.arrows button { width: 40px; height: 30px; border: 1px solid var(--line); display: grid; place-items: center; transition: all .15s; }
.arrows button:hover { background: #fff; color: var(--ink); border-color: #fff; }
.count { text-align: center; letter-spacing: .18em; color: #fff; }
.count i { font-style: normal; color: rgba(255,255,255,.4); }
.dots { display: flex; gap: 7px; justify-content: flex-end; }
.dots button { width: 26px; height: 3px; background: rgba(255,255,255,.25); transition: background .2s; }
.dots button[data-on] { background: #fff; }

@media (max-width: 820px) {
  .slide { padding: 0 20px 20px; }
  .week .split { flex-direction: column; }
  .week .tabs.column { flex: 0 0 auto; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); }
  .week .tabs.column .tab { width: auto; max-width: 180px; border-bottom: 0; border-right: 1px solid var(--line); white-space: nowrap; }
  .top { grid-template-columns: 1fr auto; }
  .top .mid { display: none; }
  .prail { display: none; }
  .story { grid-template-columns: 32px 1fr; }
  .story .tail { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rail { scroll-behavior: auto; } }
