/* jawnlam.cloud/book: the jawnlam.com Unigrid system (DESIGN.md) in black and white. */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
:root {
  --black: #000;
  --white: #fff;
  --text-2: #3B3B3B;
  --text-3: #5C5C5C;
  --rule: #D6D6D6;
  --band-muted: #D4D4D4;
  --foot-muted: #A8A8A8;
  --black-hover: #333;
  --hover: #EEEEEE;
  --err: #C8102E;
  --green: #0F7A45;
  --open-hover: #CFEBD9;
  --closed: #4A4A4A;
  --gutter: clamp(16px, 3vw, 40px);
  --font: Archivo, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--black);
  font: 400 17px/1.5 var(--font);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
.wrap { max-width: 1440px; margin: 0 auto; padding-inline: var(--gutter); width: 100%; }

/* Bands */
.nav { background: var(--black); color: var(--white); padding-top: env(safe-area-inset-top, 0px); }
.nav .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mark { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.nav-link { font-size: 13px; font-weight: 600; text-decoration: none; background: var(--white); color: var(--black); padding: 9px 14px; }
.nav-link:hover { background: var(--band-muted); }
.band { background: var(--black); color: var(--white); padding: 48px 0 36px; }
.band h1 {
  margin: 0; font-weight: 800; font-size: clamp(44px, 7vw, 104px); line-height: 0.9; letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}
.band-meta { margin: 20px 0 0; color: var(--band-muted); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.foot { background: var(--black); color: var(--foot-muted); margin-top: 96px; padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; padding-block: 28px; font-size: 13px; font-weight: 600; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--white); }

/* Layout */
.section { padding-top: 48px; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; }
.aside { grid-column: 1 / span 4; border-top: 4px solid var(--black); padding-top: 14px; }
.aside p { margin: 0 0 16px; }
.picker { grid-column: 5 / span 8; }
@media (max-width: 900px) {
  .aside, .picker { grid-column: 1 / -1; }
}
.prose { max-width: 720px; margin-inline: 0; }
.prose p { margin: 0 0 20px; font-size: 19px; line-height: 1.6; }
.small { font-size: 15px; color: var(--text-3); }

/* Index */
.choices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.choices li { grid-column: span 6; }
@media (max-width: 760px) { .choices li { grid-column: 1 / -1; } }
.choice { display: block; text-decoration: none; border-top: 12px solid var(--black); padding: 14px 0 12px; }
.choice:hover .choice-title { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.choice-title { display: block; font-weight: 800; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; letter-spacing: -0.025em; }
.choice-meta { display: block; margin-top: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.choice-desc { display: block; margin-top: 10px; color: var(--text-2); }
.empty { grid-column: 1 / -1; }

/* Picker */
.step { margin: 36px 0 14px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.tzrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 4px solid var(--black); padding-top: 14px; }
.tzrow label { font-size: 13px; font-weight: 600; }
select, input, textarea {
  font: inherit; color: inherit; background: var(--white); border: 0; border-radius: 0;
  border-bottom: 2px solid var(--black); padding: 10px 0; width: 100%;
}
select { width: auto; max-width: 100%; padding-right: 8px; cursor: pointer; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-width: 4px; padding-bottom: 8px; }
:focus-visible { outline: 3px solid var(--black); outline-offset: 2px; }
/* Availability colours: white = available (green on hover), solid green = selected,
   dark grey with white type = unavailable (no hover). */
.cal { max-width: 560px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-month { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.cal-nav {
  font: inherit; font-size: 20px; font-weight: 700; width: 44px; height: 44px; cursor: pointer;
  background: var(--white); color: var(--black); border: 2px solid var(--black); border-radius: 0;
}
.cal-nav:hover:not(:disabled) { background: var(--open-hover); }
.cal-nav:disabled { border-color: var(--rule); color: var(--rule); cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; padding-bottom: 6px; }
.cal-day {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; min-height: 40px;
  font: inherit; font-size: 17px; font-weight: 700; border-radius: 0; padding: 0;
}
.cal-day.open { background: var(--white); color: var(--black); border: 2px solid var(--black); cursor: pointer; }
.cal-day.open:hover { background: var(--open-hover); }
.cal-day.open[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--white); }
.cal-day.closed { background: var(--closed); color: var(--white); border: 2px solid var(--closed); }
.dayview { display: flex; flex-direction: column; gap: 4px; max-width: 560px; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 48px;
  padding: 10px 14px; font: inherit; text-align: left; border-radius: 0;
}
.row-time { font-weight: 700; font-size: 17px; }
.row-state { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.row.open { background: var(--white); color: var(--black); border: 2px solid var(--black); cursor: pointer; }
.row.open:hover { background: var(--open-hover); }
.row.open[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--white); }
.row.closed { background: var(--closed); color: var(--white); border: 2px solid var(--closed); }
.form { margin-top: 8px; }
.chosen { font-weight: 700; font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
.field { margin: 20px 0 0; }
.field label { display: block; font-size: 13px; font-weight: 600; }
.req { color: var(--text-3); font-weight: 400; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.err { color: var(--err); font-weight: 700; margin: 20px 0 0; }
.btn {
  display: inline-block; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  background: var(--black); color: var(--white); border: 0; border-radius: 0; padding: 14px 20px; margin-top: 28px;
}
.btn:hover { background: var(--black-hover); }
.btn:disabled { background: var(--text-3); cursor: wait; }
.btn-line { background: var(--white); color: var(--black); border: 2px solid var(--black); padding: 12px 18px; }
.btn-line:hover { background: var(--hover); }
.done { border-top: 12px solid var(--black); padding-top: 14px; }
.done h2 { font-size: clamp(28px, 3vw, 42px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 16px; }
.done p { margin: 0 0 12px; }

/* Admin */
.admin-sec { margin-top: 56px; }
.admin-sec:first-child { margin-top: 0; }
.admin-sec > h2 { margin: 0 0 16px; padding-top: 14px; border-top: 12px solid var(--black); font-size: clamp(28px, 3vw, 42px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th { text-align: left; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 12px 8px 0; border-bottom: 2px solid var(--black); white-space: nowrap; }
td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
td .sub { display: block; color: var(--text-3); font-size: 13px; }
.status { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.status.off { color: var(--text-3); }
.linkbtn { font: inherit; font-size: 15px; font-weight: 700; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: inherit; margin-right: 12px; }
.panel { border: 2px solid var(--black); padding: clamp(16px, 2.5vw, 28px); margin-top: 20px; }
.panel h3 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.fgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; }
.f3 { grid-column: span 3; } .f4 { grid-column: span 4; } .f6 { grid-column: span 6; } .f12 { grid-column: 1 / -1; }
@media (max-width: 760px) { .f3, .f4, .f6 { grid-column: 1 / -1; } }
.check { display: flex; gap: 10px; align-items: center; margin-top: 20px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--black); }
.hours { display: grid; grid-template-columns: 64px 1fr; gap: 0 16px; align-items: end; max-width: 520px; }
.hours label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding-bottom: 12px; }
.qrow { display: grid; grid-template-columns: 1fr 140px auto auto; gap: 12px; align-items: end; margin-top: 12px; }
@media (max-width: 760px) { .qrow { grid-template-columns: 1fr; } }
.qrow .check { margin: 0 0 10px; }
.hint { font-size: 13px; color: var(--text-3); margin: 6px 0 0; }
.msg { font-weight: 700; margin: 16px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions .btn { margin-top: 28px; }

/* Meeting method choice */
.methods { border: 0; padding: 0; margin: 20px 0 0; }
.methods legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.method { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-weight: 600; cursor: pointer; }
.method input { width: 20px; height: 20px; margin: 0; accent-color: var(--black); }
.field .hint { max-width: 60ch; }

/* Embedded in another site's page (?embed=1): no bands, compact heading. */
body.embed { min-height: 0; }
.embed-head { padding-top: 8px; }
.embed-head h1 { margin: 0; font-size: clamp(28px, 3vw, 42px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.embed-meta { margin: 10px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
body.embed .section { padding-top: 28px; padding-bottom: 24px; }
