:root{--teal:#0E7C86;--navy:#18354A;--line:#d7e1e6;--bg:#f4f8fa;--err:#b3261e}
*{box-sizing:border-box}
body{margin:0;font-family:"Segoe UI",Arial,sans-serif;color:var(--navy);background:var(--bg)}
.bar{display:flex;align-items:center;gap:12px;padding:10px 18px;background:#fff;border-bottom:1px solid var(--line)}
.bar .banner{opacity:0}
.env{margin-left:auto;font-size:11px;letter-spacing:.08em;color:var(--teal);font-weight:600}
.wrap{max-width:980px;margin:0 auto;padding:22px 18px}
.card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:22px}
h1{font-size:21px;margin:0 0 4px}
.meta{margin:0 0 18px;color:#5a7384;font-size:13px}
.about{font-size:13.5px;line-height:1.55;color:#3d5a6c;border-bottom:1px solid var(--line);padding-bottom:14px}
.about p{margin:0 0 10px}
.about h2{font-size:13px;margin:0 0 6px;color:var(--navy)}
.about ul{margin:0;padding-left:18px}
.about li{margin:3px 0}
label{display:block;font-size:13px;font-weight:600;margin:14px 0 6px}
input[type=text]{width:100%;max-width:220px;padding:9px 11px;border:1px solid var(--line);border-radius:6px;font-size:15px}
.hint{margin:6px 0 0;font-size:12px;color:#5a7384}
.check{font-weight:400;display:flex;align-items:center;gap:8px;margin-top:16px}
.check input{width:auto}
.err{color:var(--err);font-size:13px;margin:14px 0 0;border-left:3px solid var(--err);padding:8px 10px;background:#fdf0ef;border-radius:0 6px 6px 0}
button{margin-top:18px;padding:11px 26px;border:0;border-radius:6px;background:var(--teal);color:#fff;font-size:15px;font-weight:600;cursor:pointer}
.result{margin-top:22px;border-top:1px solid var(--line);padding-top:16px}
.ok{color:#1b7f4b;font-weight:600;margin:0 0 10px}
dl{display:grid;grid-template-columns:120px 1fr;gap:6px 14px;margin:0;font-size:14px}
dt{color:#5a7384}
dd{margin:0;font-weight:600}

/* Fixed footer. No bottom spacer is reserved for it: this is the defect
   the responsive exercise is meant to find at the smallest supported width. */
.fixed-footer{position:fixed;left:0;right:0;bottom:0;height:56px;display:flex;
  align-items:center;justify-content:center;background:var(--navy);color:#fff;font-size:12px}

/* 768 and up: two columns keep the form short, so Confirm stays clear of the footer. */
@media (min-width:768px){
  .card{display:grid;grid-template-columns:1fr 1fr;gap:0 34px;align-items:start}
  h1,.meta{grid-column:1/-1}
  .about{grid-column:2;grid-row:3/span 2;border-bottom:0;border-left:1px solid var(--line);
    padding:0 0 0 24px}
  #bookForm{grid-column:1;grid-row:3}
  .result{grid-column:1;grid-row:4;margin-top:18px}
}

/* practice app additions */
.logo{font-weight:700;font-size:16px;color:var(--teal);letter-spacing:.01em}
.result dl{margin-top:4px}

/* ---- practice platform: shared chrome and tables ---------------------- */

.labnav {
  display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap;
  padding: .6rem 1.2rem; background: #f4f6f8; border-bottom: 1px solid #dde3e8;
  font-size: .95rem;
}
.labnav a.home {
  font-weight: 600; text-decoration: none; padding: .15rem .5rem;
  border: 1px solid #cfd8e0; border-radius: 4px; background: #fff;
}
.labnav a.home:hover { background: #eef2f6; }
.labnav a:not(.home) { margin-left: auto; }
.brief {
  margin: 0; padding: .7rem 1.2rem; background: #fffdf5;
  border-bottom: 1px solid #ece4c8; color: #4a4334; font-size: .92rem;
  line-height: 1.5;
}

table.grid {
  width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .92rem;
}
table.grid caption {
  text-align: left; font-weight: 600; padding-bottom: .4rem;
}
table.grid th, table.grid td {
  border: 1px solid #dde3e8; padding: .4rem .55rem; text-align: left;
  vertical-align: top;
}
table.grid th { background: #f4f6f8; font-weight: 600; }
table.grid tr:nth-child(even) td { background: #fbfcfd; }

.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

dl.totals {
  display: grid; grid-template-columns: max-content auto; gap: .25rem 1.2rem;
  margin: 1rem 0; max-width: 22rem;
}
dl.totals dt { color: #555; }
dl.totals dd { margin: 0; text-align: right; }

pre.code {
  background: #1f2933; color: #e6edf3; padding: .8rem 1rem; border-radius: 4px;
  overflow-x: auto; font-size: .85rem; line-height: 1.5;
}

/* A label that is read aloud but not shown, for cells where the column
   heading already names the field. */
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

select, textarea { font: inherit; padding: .4rem; margin-bottom: .8rem; }
