/* ArborGen customer portal: what Home, Orders and one order add to portal.css (index.html, orders.html, order.html).
   Linked after /css/portal.css and before /brand.css, so brand.css still has the last word on the palette.
   Phone first, like portal.css: everything here is the 360px layout and the wider layout is added at the foot.
   Only brand.css's and portal.css's tokens are used, so light and dark follow the phone's own setting.

     shared     .back  .title-row  .section  .chip.wrap  .why  .counts  .said  .facts  .tight
     home       .need  .msg  .msg.unread  .order-line
     one order  .addr  .agree-nursery  .totals  .line-card  .ask-card  .confirm  .step
     calendar   .cal  .cal-head  .cal-grid  .cal-dow  .cal-day (.open .closed .picked .told .yours)  .cal-legend  .cal-note */

/* ---- shared by the three pages ---- */
.back{display:inline-block;margin:0 0 10px;font-weight:600}
.title-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0 0 10px}
.title-row h1{margin:0}
.section{margin-top:34px}
.section>h2:first-child{margin-top:0}
.chip.wrap{white-space:normal;text-align:left}          /* the server's own words can be long: "Van empty: we are coming for it" */
.why{margin:14px 0 0;padding:10px 14px;border-left:4px solid var(--line-2);background:var(--surface-2);border-radius:0 var(--radius-s) var(--radius-s) 0;color:var(--ink-2)}
.said{margin:0 0 16px}                                  /* what the last press answered */
.tight{margin-bottom:6px}
.facts{margin:0 0 12px;color:var(--ink-2)}
.facts>span{display:block}
p.day-big{font-family:var(--ag-display,Georgia,serif);font-size:1.45rem;font-weight:700;line-height:1.2;margin:0 0 6px}

/* four numbers side by side: ordered, ready, received, left (two by two on a phone) */
dl.counts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
dl.counts>div{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-s);padding:8px 12px}
dl.counts dt{color:var(--muted);font-size:.92rem;line-height:1.3}
dl.counts dd{margin:0;font-weight:700;font-size:1.25rem;font-variant-numeric:tabular-nums}
dl.counts>div.left{border-color:var(--accent-bar);background:var(--accent-soft)}
/* 25 Nov 2026 review (SCR-68): the muted label on the green box was 4.35:1 in the dark theme; ink-2 is 7.08:1 dark, 6.53:1 light */
dl.counts>div.left dt{color:var(--ink-2)}

/* ---- home ---- */
.need h3{margin-top:0}
ul.msgs>li.msg{padding:14px 0 14px 14px;border-left:4px solid transparent}
ul.msgs>li.msg.unread{border-left-color:var(--info)}
.msg h3{margin:0;font-size:1.06rem}
.msg p{margin:4px 0 0}
.msg .msg-go{margin-top:10px}
.order-line h3{margin:0;font-size:1.1rem}
.order-line p{margin:4px 0 0}

/* ---- one order: the purchase agreement ---- */
.agree-nursery{margin:0 0 14px;padding:0 0 14px;border-bottom:1px solid var(--line)}
.agree-nursery strong{display:block;font-family:var(--ag-display,Georgia,serif);font-size:1.12rem}
.addr{font-style:normal;margin:0 0 14px}
.addr strong{display:block;color:var(--muted);font-weight:600}
dl.totals{display:grid;grid-template-columns:1fr auto;gap:8px 0;margin:4px 0 0}
dl.totals dt{color:var(--muted)}
dl.totals dd{margin:0;padding-left:24px;text-align:right;font-weight:600;font-variant-numeric:tabular-nums}
dl.totals .grand{font-size:1.15rem;font-weight:700;color:var(--ink);padding-top:8px;border-top:2px solid var(--line-2)}
.small{font-size:.94rem;color:var(--muted)}
table.cards td .small,.list .small{display:block}

/* ---- one order: a seedling line, a request, a van ---- */
.line-card h3,.ask-card h3,.van-card h3{margin:0}
.more-form{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.confirm{margin-top:16px}
.confirm h4{margin:0 0 6px;font-size:1.06rem}
.confirm:focus,.said:focus,h2:focus,h3:focus,#ask-form:focus,.more-form:focus,.error-text:focus{outline:none}                 /* focus is moved here by script, to be read out; it is not a control */
details.inside{margin:10px 0 0}
details.inside>summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:600;color:var(--accent-ink)}

/* ---- one order: asking for a day ---- */
.step{border-top:1px solid var(--line);padding-top:18px;margin-top:22px}
.step>h3{margin-top:0;font-size:1.15rem}
.choice>span{display:block}
.choice .hint{display:block}
.review{font-size:1.06rem;font-weight:600}
.total-line{font-weight:700;margin:0 0 4px}

.cal{margin:0 0 6px}
.cal-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:14px 0 10px}
.cal-month{margin:0;flex:1 1 auto;text-align:center;font-family:var(--ag-display,Georgia,serif);font-size:1.2rem;font-weight:700}
.cal-nav{flex:0 0 auto;min-width:52px;padding-left:12px;padding-right:12px}
.cal-nav .long{display:none}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin:0 -14px}   /* out into the card's own padding: every pixel of width goes to the days */
.cal-dow{text-align:center;font-size:.85rem;font-weight:700;color:var(--muted);padding:2px 0}
.cal-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;min-height:58px;padding:4px 0;
  font:inherit;line-height:1.1;border-radius:10px;cursor:pointer}
.cal-day .n{font-size:1.18rem;font-variant-numeric:tabular-nums}
.cal-day .m{font-size:.8rem;min-height:1em;font-weight:700}
/* open: a white button with a solid green edge and a bold number. closed: a flat grey box with a dashed edge, a lighter
   number and a mark that says why. The difference never rests on colour alone. */
.cal-day.open{background:var(--surface);color:var(--ink);border:2px solid var(--accent)}
.cal-day.open .n{font-weight:700}
.cal-day.open:hover{background:var(--accent-soft)}
.cal-day.closed{background:var(--surface-3);color:var(--ink-2);border:1px dashed var(--line-2);cursor:default}
.cal-day.closed.told{border:2px solid var(--ink-2)}
.cal-day.picked,.cal-day.picked:hover{background:var(--accent);color:var(--surface);border:2px solid var(--accent)}
.cal-blank{min-height:1px}
/* 25 Nov 2026 review (SCR-66): while the next days are read, the old ones are greyed and do nothing */
.cal[aria-busy="true"] .cal-grid,.cal[aria-busy="true"] .cal-head{opacity:.5}
.cal[aria-busy="true"] .cal-day{cursor:progress}
/* "When your nursery is open" (ASK-53) */
#nursery-hours details.fold{margin:0 0 12px}
ul.closed-days{margin:0 0 10px}
ul.cal-legend{list-style:none;margin:14px 0 10px;padding:0;display:grid;grid-template-columns:1fr;gap:8px}
ul.cal-legend>li{display:flex;align-items:center;gap:10px}
.cal-key{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:8px;font-weight:700;line-height:1}
.cal-key.open{background:var(--surface);color:var(--ink);border:2px solid var(--accent)}
.cal-key.closed{background:var(--surface-3);color:var(--ink-2);border:1px dashed var(--line-2)}
.cal-key.picked{background:var(--accent);color:var(--surface);border:2px solid var(--accent)}
.cal-key.word{font-size:.72rem}
.cal-note{min-height:3.2em;margin:10px 0 0;padding:10px 14px;border-radius:var(--radius-s);background:var(--surface-2);border:1px solid var(--line);font-weight:600}
.cal-wait{padding:26px 12px;text-align:center;color:var(--muted)}

/* ---- wider screens ---- */
@media (min-width:480px){
  ul.cal-legend{grid-template-columns:1fr 1fr}
  .cal-nav .long{display:inline}
}
@media (min-width:700px){
  dl.counts{grid-template-columns:repeat(4,1fr)}
  .cal{max-width:560px}
  .cal-grid{margin:0;gap:6px}
  .cal-day{min-height:64px}
  dl.totals{max-width:380px;margin-left:auto}
  .facts>span{display:inline}
  .facts>span+span::before{content:"\00B7";margin:0 .45em}
  .agree-two{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}
  /* a form reads better in a column than across the whole page */
  #ask-form .field,#ask-form [role="radiogroup"],#ask-form .cal-note,#ask-form ul.cal-legend,.more-form .field,.confirm .field{max-width:560px}
  /* portal.css takes the line off the last cell of a row for the phone's cards; as a table every cell of a row has it */
  table.cards tbody tr:not(:last-child) td:last-child{border-bottom:1px solid var(--line)}
}

/* ---- on paper: the order as the agreement lays it out, without the forms ---- */
@media print{
  .section{margin-top:18px}
  .why,.cal,.more-form,.confirm,.back,details.inside>summary{display:none !important}
  #days:has(#requests:empty){display:none}                 /* no request made: nothing to print under that heading */
  dl.counts{grid-template-columns:repeat(4,1fr)}
  table.cards tbody tr:not(:last-child) td:last-child{border-bottom:1px solid #bbb}
  .facts>span{display:inline}
  .facts>span+span::before{content:"\00B7";margin:0 .45em}
}
