:root{font-family:"Aptos","Inter",system-ui,sans-serif;color:#183338;background:#eff5f4;--ink:#183338;--teal:#12665e;--navy:#123b3d;--border:#d3e2df;--muted:#48646a;--paper:#fff;line-height:1.48}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{border:1px solid #b9ceca;background:#fff;color:var(--ink);border-radius:9px;padding:.6rem .9rem;font-weight:650;cursor:pointer;min-height:44px}button:hover{background:#eaf5f2}button:disabled{opacity:.6;cursor:wait}button.primary{background:var(--teal);color:white;border-color:var(--teal)}button.primary:hover{background:#0c514b}button.danger{color:#9c2424}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid #1b887a;outline-offset:2px}[hidden]{display:none!important}.top{display:flex;align-items:center;justify-content:space-between;padding:.85rem clamp(1rem,4vw,3rem);color:white;background:#103533;gap:1rem}.brand{display:flex;align-items:center;gap:.65rem;font-size:1.12rem;font-weight:750}.logo{display:grid;place-items:center;background:#d8f4eb;color:#155d55;border-radius:10px;width:38px;height:38px;flex:none}#mode{font-size:.9rem;color:#d1e7e2;text-align:right}.layout{max-width:1530px;margin:auto;display:grid;grid-template-columns:245px minmax(0,1fr);min-height:calc(100vh - 65px)}.layout.viewer{grid-template-columns:minmax(0,1fr);max-width:1260px}aside{background:#f8fbfa;border-right:1px solid var(--border);padding:1.7rem 1.05rem}aside h2{font-size:1rem;margin:1.55rem 0 .55rem}.wide{width:100%}.saved{width:100%;text-align:left;margin:.2rem 0;overflow-wrap:anywhere}.saved[aria-current=true]{background:#dcefeb;border-color:#90bcb2;color:#124c45}.aside-note{font-size:.87rem;color:var(--muted);margin-top:1.4rem}main{padding:clamp(1rem,3vw,2.5rem);min-width:0}.hero{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;padding:clamp(1.2rem,3vw,2rem);background:linear-gradient(125deg,#123d40,#175752);border-radius:16px;color:white;margin-bottom:1.15rem}.hero h1{font-family:Georgia,serif;font-size:clamp(2rem,5vw,3.4rem);font-weight:600;line-height:1.07;margin:.45rem 0;overflow-wrap:anywhere}.hero p{margin:.35rem 0;color:#e2f5ee}.hero .eyebrow{font-size:.8rem;letter-spacing:.095em;font-weight:700;color:#b8ebdc}#status{font-size:.89rem;color:#d9f1ec;text-align:right;min-width:8rem}.card{background:white;border:1px solid var(--border);border-radius:13px;margin-bottom:1rem}.empty{padding:clamp(1.25rem,4vw,2.5rem)}h2{font-size:1.23rem;margin:0}.empty p,.section-head p,.noRows{color:var(--muted)}.actions,.dialog-actions{display:flex;gap:.55rem;flex-wrap:wrap;justify-content:flex-end;margin-bottom:1rem}.actions button{flex-shrink:0}.section-head{display:flex;align-items:center;justify-content:space-between;padding:1rem;gap:.75rem}.section-head p{margin:.18rem 0 0;font-size:.92rem}.table-wrap{overflow-x:auto}table{border-collapse:collapse;table-layout:fixed;width:100%;min-width:695px;text-align:left}th{background:#e0efeb;padding:.75rem .5rem;font-size:.88rem;line-height:1.2;color:#234b46}td{padding:.45rem .35rem;border-bottom:1px solid #e3eeeb;vertical-align:top;overflow-wrap:anywhere}tr:nth-child(even) td{background:#f8fbfa}th:first-child{width:134px}th:nth-child(n+2):nth-child(-n+5){width:12%}th:last-child{width:54px}input,textarea,select{width:100%;min-width:0;border:1px solid #bed1ce;padding:.42rem .48rem;border-radius:6px;background:white;color:var(--ink);font-size:1rem;min-height:41px}input[type=date]{-webkit-min-logical-width:0}textarea{resize:vertical;min-height:42px}.remove{min-width:44px;color:#9c2424;padding:.35rem}.mobile-label{display:none}summary{cursor:pointer;font-weight:700;padding:1rem}.fields{padding:0 1rem 1rem;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.fields label{font-size:.9rem;font-weight:650}.fields input,.fields select{display:block;margin-top:.25rem}.footer-actions{text-align:right}.noRows{padding:0 1rem 1rem}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}dialog{width:min(480px,calc(100% - 2rem));border:1px solid var(--border);border-radius:14px;padding:1.35rem;color:var(--ink)}dialog::backdrop{background:#092c2b9c}.dialog-actions{margin:1rem 0 0}.dialog-actions button:first-child{margin-right:auto}#dialogBody p{overflow-wrap:anywhere}#dialogBody label{display:block;margin:.85rem 0}.dialog-error{color:#9c2424}.viewer .remove-head,.viewer .remove-cell{display:none}.viewer td{padding:.68rem .5rem;white-space:pre-wrap}.viewer main{width:100%}
@media(max-width:780px){.layout{display:block}aside{border-right:0;border-bottom:1px solid var(--border);padding:.85rem 1rem}aside h2{margin:.75rem 0 .3rem}#logs{display:flex;gap:.4rem;flex-wrap:wrap}.saved{width:auto}.aside-note{margin:.65rem 0 0}.wide{width:auto}.hero{display:block}#status{text-align:left;margin-top:.7rem}.actions{justify-content:flex-start}.fields{grid-template-columns:repeat(2,minmax(0,1fr))}table,tbody{display:block;min-width:0}thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;padding:.85rem 1rem;border-top:1px solid var(--border)}td, tr:nth-child(even) td,.viewer td{border:0;padding:0;background:none}tr:nth-child(even){background:#f6faf9}td:first-child,td:nth-child(6){grid-column:1/-1}.mobile-label{display:block;font-size:.86rem;font-weight:700;margin-bottom:.2rem}.remove-cell{grid-column:1/-1;text-align:right}.viewer tr{padding:.85rem 1rem}.viewer td{min-height:2rem}}@media(max-width:380px){.fields{grid-template-columns:1fr}#mode{font-size:.8rem}}
th:last-child{width:74px}.viewer th:nth-last-child(2){width:24%}

/* Keep the entire sheet visible at phone widths without sideways scrolling. */
th small{display:block;margin-top:.15rem;font-size:.75em;font-weight:500}
.remove{font-size:1.15rem;line-height:1}
@media(max-width:780px){
  .top{padding:.5rem .65rem}
  .logo{width:31px;height:31px}
  .brand{font-size:1rem}
  #mode{font-size:.75rem}
  aside{display:flex;flex-wrap:wrap;align-items:center;gap:.38rem;padding:.45rem .55rem}
  aside h2{margin:0;font-size:.82rem}
  #logs{flex:1;min-width:105px;gap:.28rem}
  .saved{margin:0}
  aside button{min-height:34px;font-size:.8rem;padding:.25rem .45rem}
  .aside-note{display:none}
  main{padding:.55rem}
  .hero{padding:.63rem .75rem;margin-bottom:.55rem;border-radius:10px}
  .hero h1{font-size:1.75rem;margin:.15rem 0}
  .hero .eyebrow{font-size:.63rem}
  .hero p,#status{font-size:.78rem;margin:.16rem 0}
  .actions{margin-bottom:.55rem;gap:.3rem}
  .actions button{min-height:36px;font-size:.83rem;padding:.3rem .55rem}
  .card{margin-bottom:.55rem;border-radius:9px}
  summary{padding:.5rem .65rem;font-size:.9rem}
  .section-head{padding:.45rem .55rem}
  .section-head h2{font-size:1rem}
  .section-head p{font-size:.76rem}
  .section-head button{min-height:36px;font-size:.82rem;padding:.3rem .55rem}
  .table-wrap{overflow:visible}
  table{display:table;min-width:0;font-size:.78rem}
  thead{display:table-header-group;position:static;width:auto;height:auto;overflow:visible;clip-path:none}
  tbody{display:table-row-group}
  tr,.viewer tr{display:table-row;padding:0;border:0}
  th,td,.viewer td,tr:nth-child(even) td{display:table-cell;padding:2px;border-bottom:1px solid var(--border);vertical-align:middle}
  th{font-size:clamp(.59rem,2.6vw,.74rem);padding:5px 1px;text-align:center}
  th:first-child{width:20%}
  th:nth-child(n+2):nth-child(-n+5){width:14.5%}
  th:last-child{width:25px}
  .viewer th:nth-last-child(2){width:22%}
  td{border-right:1px solid var(--border)}
  td:last-child{border-right:0}
  td input,td textarea{display:block;border:0;border-radius:3px;padding:0 1px;background:transparent;height:35px;min-height:35px;font-size:16px}
  td input{text-align:center}
  td input[aria-label^="Date"]{font-size:16px;letter-spacing:-.65px}
  td input::placeholder{font-size:.63rem;letter-spacing:0}
  td textarea{padding-top:6px;resize:vertical;line-height:1.15}
  .remove-cell{text-align:center}
  .remove{min-width:0;width:100%;min-height:34px;padding:0;background:transparent;border:0}
  .viewer td{font-size:.76rem;text-align:center}
}

#accountLink{color:#e0f5ed;font-size:.82rem;text-underline-offset:.16em;text-align:right} #accountLink[aria-disabled=true]{cursor:wait;opacity:.65} #accountMessage{color:#623a15;background:#fff4db;border:1px solid #edd7a9;border-radius:8px;padding:.65rem;margin:0 0 .65rem}

/* A paper-style sheet, with editing controls immediately above the readings. */
:root{background:#f5f8f7}
.top{background:#fff;color:#163a36;border-bottom:1px solid #d3e2df}
#accountLink,#mode{color:#185b54}
.hero{display:flex;align-items:baseline;gap:.55rem;background:none;color:var(--ink);padding:.05rem 0 .25rem;margin-bottom:.6rem}
.hero h1{font:700 clamp(1.45rem,4vw,2rem)/1.15 system-ui,sans-serif;margin:0}
.hero p{color:var(--muted);font-size:.82rem;margin:.24rem 0 0}
#status{color:var(--muted);font-size:.76rem;min-width:0;margin:0}
.section-head{background:#fcfdfd;border-radius:inherit;padding:.5rem .65rem}
.section-head p{margin:0;color:var(--muted);font-weight:600}
.readings{overflow:hidden}
.actions{justify-content:flex-start}
th{background:#e4f0eb}
@media(max-width:780px){
  .hero{align-items:flex-start}
  .hero h1{font-size:1.35rem}
  .hero p{font-size:.74rem}
  #status{text-align:right;max-width:36%;font-size:.69rem;line-height:1.3}
  aside h2{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  input,textarea,select{font-size:16px}
  td input,td textarea{font-size:16px;height:40px;min-height:40px}
  th{font-size:clamp(.57rem,2.5vw,.72rem);min-height:26px}
  .section-head p{font-size:.78rem}
}
