:root{
  /* AKU brand colors (Brand user's manual) */
  --aku-orange: rgb(239,121,23);
  --aku-black: rgb(0,0,0);
  --aku-white: rgb(255,255,255);

  /* UI neutrals */
  --bg: var(--aku-white);
  --text: #111;
  --muted: #444;
  --line: #e8e8e8;
  --surface: #f6f6f6;

  /* Semantic status colors */
  --good-bg:    #eaf5ec;
  --good-text:  #1a6b2a;
  --good-border:#b5debb;
  --ok-bg:      #fdf6e3;
  --ok-text:    #7a5700;
  --ok-border:  #f0d880;
  --caution-bg: #fff3e6;
  --caution-text:#b34700;
  --caution-border:rgba(239,121,23,0.5);
  --warn-bg:    #fdecea;
  --warn-text:  #9b1c1c;
  --warn-border:#f5b7b1;

  /* Typography: Owners is the brand family. If you can't self-host Owners webfonts,
     this falls back to Arial/system fonts, as allowed. */
  --font-head: "Owners XWide", "Owners", Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Owners Text", "Owners", Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  padding:16px;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Card stays minimal + monochrome, with orange used as identity accent */
.card{
  max-width:560px;
  margin:0 auto;
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  background:var(--aku-white);
}

/* Orange band is a recurring visual signature in AKU coordinated materials */
.brand-band{
  height:10px;
  width:100%;
  background:var(--aku-orange);
  border-radius:14px;
  margin-bottom:12px;
}

.header h1{
  font-family:var(--font-head);
  font-weight:600;
  letter-spacing:0;
  font-size:20px;
  margin:0;
}

.brand-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}

.title-wrap{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.payoff{
  margin:0;
  font-family:var(--font-head);
  font-weight:400;
  font-size:12px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--aku-black);
}

/* Body copy */
.sub{
  margin:12px 0 0;
  color:var(--muted);
  line-height:1.4;
  font-size:13px;
}

/* How-to */
.howto{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  margin:14px 0 14px;
  background:var(--aku-white);
}
.howto summary{
  cursor:pointer;
  font-family:var(--font-head);
  font-weight:500;
  font-size:13px;
}
.howto ol{
  margin:10px 0 0 18px;
  padding:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}
.howto-body{
  margin-top:10px;
}
.howto-section-title{
  font-family:var(--font-head);
  font-weight:600;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:var(--text);
  margin:14px 0 4px;
}
.howto-section-title:first-child{
  margin-top:6px;
}
.howto-note{
  font-size:12px;
  color:var(--muted);
  font-style:italic;
  line-height:1.45;
  margin:12px 0 4px;
  padding:8px 10px;
  background:var(--surface);
  border-radius:8px;
  border:1px solid var(--line);
}

/* Width reference table (inside how-to) */
.width-ref-table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  margin:8px 0 0;
  color:var(--text);
}
.width-ref-table th,
.width-ref-table td{
  border:1px solid var(--line);
  padding:5px 8px;
  text-align:center;
}
.width-ref-table th{
  background:var(--surface);
  font-family:var(--font-head);
  font-weight:600;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.06em;
  color:var(--muted);
}
.width-ref-table tr:first-child th{ border-top:none; }
.width-ref-table tr td:first-child{ font-weight:600; }
@media (max-width:480px){
  .width-ref-table th,
  .width-ref-table td{ padding:4px 5px; font-size:11px; }
}

/* Inputs */
.inputs label{
  display:block;
  font-size:13px;
  margin:12px 0 6px;
  font-family:var(--font-head);
  font-weight:500;
}
input[type="number"], select{
  width:100%;
  padding:10px 12px;
  font-size:16px;
  border:1px solid #cfcfcf;
  border-radius:14px;
  background:var(--aku-white);
  color:var(--aku-black);
  outline:none;
}
input[type="number"]:focus, select:focus{
  border-color: var(--aku-orange);
  box-shadow: 0 0 0 3px rgba(239,121,23,0.18);
}

.row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media (max-width:520px){ .row{ grid-template-columns:1fr; } }

.toggle{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-top:12px;
}
.toggle input{ margin-top:2px; accent-color: var(--aku-orange); }
.toggle label{
  margin:0;
  font-weight:400;
  font-size:13px;
  color:var(--text);
}

/* Result */
.result{
  margin-top:14px;
  padding:14px;
  border-radius:16px;
  background:var(--surface);
  border:1px solid var(--line);
}

.badges{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 10px; }
.badge{
  display:inline-block;
  padding:2px 10px;
  border-radius:999px;
  border:1px solid #d9d9d9;
  background:var(--aku-white);
  font-size:12px;
  color:var(--aku-black);
}

.kv{
  display:grid;
  grid-template-columns:140px 1fr;
  gap:6px 10px;
  margin:8px 0 0;
  font-size:14px;
}
.k{ font-family:var(--font-head); font-weight:600; color:var(--aku-black); }
.v{ color:var(--aku-black); }

.hint{
  margin:12px 0 0;
  font-size:12px;
  line-height:1.45;
  color:var(--muted);
}

.warn{
  margin:8px 0 0;
  padding:12px;
  border-radius:14px;
  background:var(--aku-white);
  border:1px solid rgba(239,121,23,0.45);
  font-size:13px;
  line-height:1.45;
}

/* ---- Size hero (prominent UK size display) ---- */
.size-hero{
  display:flex;
  align-items:center;
  gap:20px;
  padding:14px 16px;
  background:var(--aku-white);
  border:1px solid var(--line);
  border-radius:16px;
  margin:4px 0 0;
}
.size-hero-main{
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:72px;
  border-right:1px solid var(--line);
  padding-right:20px;
}
.size-hero-label{
  font-family:var(--font-head);
  font-weight:600;
  font-size:11px;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:var(--muted);
  line-height:1;
  margin-bottom:2px;
}
.size-hero-number{
  font-family:var(--font-head);
  font-weight:700;
  font-size:52px;
  line-height:1;
  color:var(--aku-black);
  letter-spacing:-1px;
}
.size-hero-secondary{
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:1;
}
.size-secondary-item{
  display:flex;
  align-items:baseline;
  gap:8px;
}
.size-secondary-label{
  font-family:var(--font-head);
  font-weight:500;
  font-size:11px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--muted);
  min-width:90px;
}
.size-secondary-value{
  font-family:var(--font-body);
  font-size:15px;
  font-weight:600;
  color:var(--aku-black);
}
@media (max-width:360px){
  .size-hero{ gap:12px; padding:12px; }
  .size-hero-number{ font-size:42px; }
  .size-secondary-label{ min-width:70px; font-size:10px; }
}

/* ---- Width panel ---- */
.width-panel{
  margin-top:14px;
  padding:14px;
  border-radius:14px;
  background:var(--aku-white);
  border:1px solid var(--line);
}
.width-panel-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.width-panel-label{
  font-family:var(--font-head);
  font-weight:600;
  font-size:11px;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--muted);
}

/* Width fit badges */
.width-badge{
  display:inline-block;
  padding:3px 12px;
  border-radius:999px;
  font-family:var(--font-head);
  font-weight:600;
  font-size:12px;
  border:1px solid transparent;
  white-space:nowrap;
}
.width-good{
  background:var(--good-bg);
  color:var(--good-text);
  border-color:var(--good-border);
}
.width-ok{
  background:var(--ok-bg);
  color:var(--ok-text);
  border-color:var(--ok-border);
}
.width-caution{
  background:var(--caution-bg);
  color:var(--caution-text);
  border-color:var(--caution-border);
}
.width-warn{
  background:var(--warn-bg);
  color:var(--warn-text);
  border-color:var(--warn-border);
}

.width-panel-heading{
  font-family:var(--font-head);
  font-weight:600;
  font-size:13px;
  color:var(--text);
  margin:0 0 6px;
  line-height:1.35;
}
.width-panel-body{
  font-size:13px;
  color:var(--muted);
  line-height:1.5;
  margin:0;
}

/* Wide variant callouts */
.wide-callout,
.wide-callout-none{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-top:12px;
  padding:10px 12px;
  border-radius:10px;
  font-size:13px;
  line-height:1.45;
}
.wide-callout{
  background:var(--good-bg);
  border:1px solid var(--good-border);
  color:var(--good-text);
}
.wide-callout-none{
  background:var(--surface);
  border:1px solid var(--line);
  color:var(--muted);
}
.wide-callout-icon{
  font-size:14px;
  flex-shrink:0;
  line-height:1.45;
}
.wide-callout strong{
  font-weight:600;
}

/* Family construction note */
.width-family-note{
  font-size:12px;
  color:var(--muted);
  font-style:italic;
  line-height:1.45;
  margin:10px 0 0;
  padding:8px 10px;
  background:var(--surface);
  border-radius:8px;
  border:1px solid var(--line);
}

/* Placeholder text before measurements entered */
.no-measurement{
  font-size:13px;
  color:var(--muted);
  margin:0 0 6px;
  line-height:1.45;
}

/* Measured width display inside width panel */
.width-measured{
  font-size:13px;
  color:var(--text);
  margin:0 0 8px;
  padding:8px 10px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:8px;
  line-height:1.45;
}
.width-measured strong{
  font-weight:600;
  color:var(--text);
}

/* Footer */
.footer{ margin-top:12px; }
.fineprint{
  margin:0;
  font-size:12px;
  color:#555;
  line-height:1.45;
}

/* AKU logotype (monochrome). Keep clear space around it. */
.brand-logo{
  height: 28px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}
@media (max-width: 520px){
  .brand-logo{ height: 24px; }
}
