/* Rene's desk. The sky and the sun from pinoyhomescalgary.ca, on a tool used one-handed between showings.
   The one loud thing is the day line on Today: 9 am to 9 pm as a horizon, with the sun moving along it. */
@font-face { font-family: "Brygada 1918"; src: url("/fonts/brygada-1918-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk-var.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  --sky: #DCE9F5; --sky-soft: #EEF4FA; --sky-2: #C3D5EA; --city: #2B3B72; --night: #1A2652;
  --sun: #F2B43C; --sun-soft: #FCEBC2; --gold-ink: #7A5810; --ink: #1D1C1A; --stone: #5E5A55;
  --rule: #DCE3EC; --red: #A32217; --red-soft: #FBE9E7; --green: #1F6B45; --green-soft: #E2F2E9; --white: #fff;
  --serif: "Brygada 1918", Georgia, serif; --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --gutter: 16px; --tab: 62px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 16px/1.45 var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--city); }
:focus-visible { outline: 3px solid var(--city); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* Shell */
.shell { min-height: 100dvh; padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom)); }
.page { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter) 40px; }
.head { padding: 18px var(--gutter) 14px; max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.head h1 { font-size: 1.7rem; }
.tabs { position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--night); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { display: flex; align-items: center; justify-content: center; height: var(--tab); color: #BFCBE3; text-decoration: none; font-weight: 600; font-size: .95rem; }
.tabs a[aria-current="page"] { color: var(--night); background: var(--sun); }
.tabs .more { display: none; }
.safety { background: var(--sun-soft); color: #4F3A08; font-size: .9rem; padding: 8px var(--gutter); text-align: center; }

/* Today: the sky and the day line */
.sky { background: var(--sky); padding: 22px var(--gutter) 20px; }
.sky-in { max-width: 760px; margin: 0 auto; }
.sky h1 { font-size: clamp(1.75rem, 6.4vw, 2.5rem); max-width: 22ch; }
.sky p { margin: 6px 0 0; color: #33476B; }
.dayline { position: relative; height: 66px; margin: 20px 16px 2px; }
.dayline .ground { position: absolute; inset: 40px 0 auto 0; height: 3px; background: var(--night); border-radius: 2px; }
.dayline .tick { position: absolute; top: 37px; width: 1px; height: 9px; background: var(--night); }
.dayline .hour { position: absolute; top: 48px; transform: translateX(-50%); font-size: .78rem; color: #33476B; white-space: nowrap; }
.dayline .appt { position: absolute; top: 34px; height: 15px; min-width: 7px; background: var(--city); border: 2px solid var(--sky); border-radius: 4px; }
.dayline .sun { position: absolute; top: 2px; width: 44px; height: 44px; margin-left: -22px; }
.nextup { margin: 10px 0 0; font-weight: 600; color: var(--night); }

/* Sections and rows */
.sec { margin-top: 26px; }
.sec > h2 { font-size: 1.25rem; margin-bottom: 4px; }
.sec > .sub { color: var(--stone); margin: 0 0 6px; font-size: .95rem; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--rule); padding: 12px 0; min-height: 64px; }
.row .main { flex: 1; min-width: 0; text-decoration: none; color: inherit; display: block; }
.row .who { font-family: var(--serif); font-size: 1.14rem; font-weight: 600; }
.row .what { color: var(--stone); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .when { color: var(--stone); font-size: .86rem; white-space: nowrap; }
.dial { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; text-decoration: none; color: var(--night); }
.dial svg { width: 22px; height: 22px; }
.empty { color: var(--stone); padding: 14px 0; border-bottom: 1px solid var(--rule); }
.chip { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--sky); color: var(--night); white-space: nowrap; }
.chip.hot { background: var(--sun); }
.chip.booked { background: var(--green-soft); color: var(--green); }
.chip.stop { background: var(--red-soft); color: var(--red); }
.chip.quiet { background: #EEF0F3; color: var(--stone); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 10px; border: 1.5px solid var(--night); background: var(--white); color: var(--night); font-weight: 650; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--night); color: var(--white); }
.btn.sun { background: var(--sun); border-color: var(--sun); color: var(--night); }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: .92rem; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.add { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--night); color: var(--white); font-size: 1.6rem; line-height: 1; cursor: pointer; flex: none; text-decoration: none; display: grid; place-items: center; }

/* Forms */
label.f { display: block; margin-top: 14px; font-weight: 600; }
label.f input, label.f select, label.f textarea, .search { display: block; width: 100%; margin-top: 5px; min-height: 48px; padding: 10px 12px; border: 1.5px solid #AEBBCD; border-radius: 10px; background: var(--white); font-weight: 400; }
label.f textarea { min-height: 96px; resize: vertical; }
label.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; }
label.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--night); }
.hint { color: var(--stone); font-size: .9rem; margin: 4px 0 0; }
.err { color: var(--red); margin-top: 10px; font-weight: 600; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.filters button { flex: none; min-height: 38px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--white); cursor: pointer; font-weight: 600; font-size: .92rem; }
.filters button[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: var(--white); }

/* Lead */
.lead-top { background: var(--sky); padding: 16px var(--gutter) 18px; }
.lead-top .in { max-width: 760px; margin: 0 auto; }
.back { color: var(--city); text-decoration: none; font-weight: 600; display: inline-block; padding: 4px 0 8px; }
.lead-top h1 { font-size: 1.9rem; }
.lead-top .line { margin: 4px 0 12px; color: #33476B; }
.flag { background: var(--sun-soft); border-radius: 10px; padding: 10px 12px; margin-top: 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; }
.facts dt { color: var(--stone); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.call-item { border-bottom: 1px solid var(--rule); padding: 12px 0; }
.call-item summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.call-item audio { width: 100%; margin-top: 8px; }
.say { margin: 8px 0; max-width: 88%; padding: 8px 12px; border-radius: 12px; background: var(--sky-soft); overflow-wrap: anywhere; }
.say.them { margin-left: auto; background: var(--sun-soft); }
.say small { display: block; color: var(--stone); font-size: .78rem; }
.say.blocked { outline: 1.5px dashed #AEBBCD; background: var(--white); }
.tl { list-style: none; margin: 0; padding: 0; color: var(--stone); font-size: .92rem; }
.tl li { padding: 4px 0; }

/* Login */
.login { min-height: 100dvh; display: grid; place-items: center; background: var(--sky); padding: var(--gutter); }
.login form { width: 100%; max-width: 380px; }
.login h1 { font-size: 2.2rem; }
.login img { width: 96px; display: block; margin-bottom: 14px; }
.linkish { background: none; border: 0; color: var(--city); text-decoration: underline; cursor: pointer; padding: 10px 0; }

.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #B9C2CE; flex: none; }
.dot.ok { background: var(--green); }
.dot.no { background: var(--red); }

#toast { position: fixed; left: 50%; bottom: calc(var(--tab) + 14px); transform: translateX(-50%); background: var(--night); color: var(--white); padding: 10px 16px; border-radius: 10px; z-index: 40; max-width: calc(100vw - 32px); opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.on { opacity: 1; }

@media (min-width: 900px) {
  .shell { padding: 0 0 0 216px; }
  .tabs { inset: 0 auto 0 0; width: 216px; display: flex; flex-direction: column; padding: 18px 0; }
  .tabs a { justify-content: flex-start; padding: 0 22px; height: 52px; }
  .tabs .more { display: flex; margin-top: auto; }
  #toast { bottom: 24px; }
}

.linkish + .linkish { margin-left: 16px; }
