
/* chaos.haus · The lived-in haus
   Wrap product markup in .haus with data-theme="light" or "dark".
   Use data-palette="eggplant", "forest", or "terracotta".
   This stylesheet includes all six colour/mode combinations. No fonts or assets are fetched. */
.haus {
  --canvas: #f5f2eb;
  --surface: #fffdf8;
  --surface-soft: #ede8df;
  --text: #322e32;
  --muted: #6b6269;
  --line: #d9d1c8;
  --control-line: #8c8088;
  --action: #63465c;
  --action-hover: #493344;
  --on-action: #fffaf5;
  --accent-text: #745069;
  --accent-soft: #eee3e9;
  --leaf: #455d44;
  --leaf-soft: #e4eadd;
  --ochre: #84581c;
  --ochre-soft: #f3e8cd;
  --danger: #a13838;
  --danger-soft: #f9e6e1;
  --focus: #8a482a;
  --photo-mat: #fffdf8;
  --photo-ink: #463c3c;
  --shadow: 0 3px 12px #44372808, 0 14px 34px #44372806;
  --photo-shadow: 0 3px 4px #32222012, 0 16px 28px #32222015;
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Bitstream Charter", "Times New Roman", serif;
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem;
  --space-4: 1rem; --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem;
  --radius-sm: .5rem; --radius: 1rem; --radius-lg: 1.5rem;
  --content-width: 1200px;
  color-scheme: light;
  color: var(--text); background: var(--canvas);
  font: 400 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.haus[data-theme="dark"] {
  --canvas: #242127;
  --surface: #302b32;
  --surface-soft: #3a333b;
  --text: #f4eee6;
  --muted: #c1b4bd;
  --line: #514750;
  --control-line: #988c96;
  --action: #d8b7ca;
  --action-hover: #ead0df;
  --on-action: #34232f;
  --accent-text: #e2bdcf;
  --accent-soft: #493442;
  --leaf: #c0d1ad;
  --leaf-soft: #344135;
  --ochre: #e9ca87;
  --ochre-soft: #493f2d;
  --danger: #ffb2a8;
  --danger-soft: #503134;
  --focus: #f0bf7e;
  --shadow: 0 8px 24px #100c151a;
  --photo-shadow: 0 4px 8px #100c1530, 0 20px 32px #100c1530;
  color-scheme: dark;
}
/* Colour preference is independent of light/dark mode. */
.haus[data-palette="forest"] {
  --canvas: #f4f3ec; --surface: #fffdf8; --surface-soft: #e9ece2;
  --text: #29372f; --muted: #5f6b60; --line: #d1d7cc; --control-line: #7b897a;
  --action: #355c45; --action-hover: #274632; --on-action: #fcfff8;
  --accent-text: #365b43; --accent-soft: #e2ebdf;
}
.haus[data-palette="forest"][data-theme="dark"] {
  --canvas: #202722; --surface: #2a342d; --surface-soft: #354238;
  --text: #f0f1e7; --muted: #b4c3b4; --line: #48584b; --control-line: #879b88;
  --action: #b8d0a5; --action-hover: #d1e1c4; --on-action: #243421;
  --accent-text: #c3d8b3; --accent-soft: #344b39;
}
.haus[data-palette="terracotta"] {
  --canvas: #f7f0e8; --surface: #fffcf7; --surface-soft: #efe2d6;
  --text: #3c302a; --muted: #705c52; --line: #dfcfc1; --control-line: #957461;
  --action: #a45135; --action-hover: #853d26; --on-action: #fffaf5;
  --accent-text: #974a32; --accent-soft: #f4e2d6;
}
.haus[data-palette="terracotta"][data-theme="dark"] {
  --canvas: #2d231f; --surface: #382c27; --surface-soft: #45352e;
  --text: #f8eee3; --muted: #d0b8a9; --line: #60483d; --control-line: #ab8b78;
  --action: #e6b096; --action-hover: #f1cab5; --on-action: #3c281f;
  --accent-text: #f1baa0; --accent-soft: #55382b;
}

.haus *, .haus *::before, .haus *::after { box-sizing: border-box; }
.haus [hidden] { display: none !important; }
.haus h1, .haus h2, .haus h3, .haus p, .haus figure { margin: 0; }
.haus h1, .haus h2, .haus h3 { font-weight: 500; }
.haus button, .haus input, .haus select, .haus textarea { font: inherit; }
.haus button, .haus a, .haus input { -webkit-tap-highlight-color: transparent; }
.haus button { cursor: pointer; }
.haus button:disabled { cursor: not-allowed; opacity: .5; }
.haus a { color: var(--accent-text); text-underline-offset: 4px; }
.haus :focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.haus input[type="checkbox"]:focus-visible { outline-offset: 3px; }
.haus .icon { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.haus .shell { width: min(calc(100% - 80px), var(--content-width)); margin-inline: auto; }
.haus .app-header { display: flex; align-items: center; justify-content: space-between; min-height: 100px; gap: 24px; border-bottom: 1px solid var(--line); }
.haus .brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; white-space: nowrap; }
.haus .brand-mark { width: 36px; height: 38px; color: var(--accent-text); transform: rotate(-5deg); }
.haus .wordmark { font: 500 30px/1 var(--font-display); letter-spacing: -1.6px; }
.haus .wordmark em { font-weight: 400; }
/* Revision 1 identity: A happy tangle. */
.haus .brand[data-logo="tangle"] .brand-mark { transform: rotate(-7deg); }
.haus .brand[data-logo="tangle"] .wordmark { font-family: "Trebuchet MS", var(--font-body); font-size: 28px; font-weight: 500; letter-spacing: -1.7px; }
.haus .brand[data-logo="tangle"] .wordmark em { font-style: normal; }

.haus .app-nav { display: flex; gap: 7px; }
.haus .nav-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 0; border-radius: var(--radius-sm); padding: 10px 15px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 550; }
.haus .nav-button:hover { color: var(--text); background: var(--surface-soft); }
.haus .nav-button[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
.haus .household { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.haus .avatar { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: var(--leaf-soft); color: var(--leaf); font-size: 12px; font-weight: 700; }
.haus .intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 38px 30px; }
.haus .eyebrow { font-size: 11px; font-weight: 650; letter-spacing: 1.7px; text-transform: uppercase; color: var(--muted); }
.haus .intro h1 { font: 500 clamp(32px, 3.3vw, 45px)/1.18 var(--font-display); letter-spacing: -1.4px; margin-block: 7px 9px; }
.haus .intro h1 em { color: var(--accent-text); font-weight: 400; }
.haus .muted { color: var(--muted); }
.haus .small { font-size: 13px; }
.haus .date-stamp { display: flex; align-items: center; gap: 14px; color: var(--muted); flex: 0 0 auto; }
.haus .date-number { font: 400 47px/1 var(--font-display); color: var(--accent-text); }
.haus .dashboard { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 24px; align-items: start; }
.haus .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.haus .section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.haus .section-title h2, .haus .section-title h3 { font: 500 23px/1.25 var(--font-display); letter-spacing: -.5px; }
.haus .section-title > .icon { color: var(--muted); }
.haus .tonight { grid-column: span 2; min-height: 306px; display: grid; grid-template-columns: 1.3fr .9fr; position: relative; overflow: hidden; padding: 28px 30px; }
.haus .tonight-copy { display: flex; flex-direction: column; align-items: flex-start; position: relative; z-index: 1; }
.haus .tonight h2 { font: 500 32px/1.12 var(--font-display); letter-spacing: -.8px; margin-block: 18px 12px; max-width: 330px; }
.haus .tonight .meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.haus .meta span { display: inline-flex; align-items: center; gap: 5px; }
.haus .meta .icon { width: 15px; height: 15px; }
.haus .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.haus .tonight .actions { margin-top: auto; padding-top: 24px; }
.haus .button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid transparent; min-height: 44px; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--action); color: var(--on-action); font-size: 13px; line-height: 1.5; font-weight: 600; text-decoration: none; transition: background 140ms ease; }
.haus .button:hover:not(:disabled) { background: var(--action-hover); }
.haus .button.secondary { color: var(--text); background: var(--surface); border-color: var(--control-line); }
.haus .button.secondary:hover:not(:disabled) { background: var(--surface-soft); }
.haus .button.quiet { color: var(--accent-text); background: transparent; padding-inline: 10px; }
.haus .button.quiet:hover:not(:disabled) { background: var(--accent-soft); }
.haus .button.icon-button { padding: 10px; width: 44px; flex: 0 0 auto; }
.haus .tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 5px; background: var(--leaf-soft); color: var(--leaf); font-size: 11px; font-weight: 650; line-height: 1.5; }
.haus .tag.warm { background: var(--ochre-soft); color: var(--ochre); }
.haus .tag.plum { background: var(--accent-soft); color: var(--accent-text); }
.haus .food-art { width: 100%; height: 245px; align-self: center; transform: rotate(8deg); }
.haus .food-note { font: italic 17px/1.2 var(--font-display); color: var(--accent-text); position: absolute; right: 28px; bottom: 24px; transform: rotate(-5deg); }
.haus .photo-frame { background: var(--photo-mat); color: var(--photo-ink); padding: 10px 10px 15px; border-radius: 3px; box-shadow: var(--photo-shadow); transform: rotate(2deg); margin: 3px 5px 0 3px; position: relative; }
.haus .photo-frame::before { content: ""; position: absolute; width: 82px; height: 24px; left: 50%; top: -11px; transform: translateX(-50%) rotate(-7deg); background: #d1bf94bd; clip-path: polygon(2% 0,98% 2%,95% 20%,100% 33%,96% 52%,99% 80%,96% 100%,0 98%,3% 75%,0 57%,4% 34%,0 15%); z-index: 1; }
.haus .photo-frame img { display: block; width: 100%; height: 219px; object-fit: cover; border-radius: 1px; background: #cad2c7; }
.haus .photo-frame figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 6px 0; font: italic 20px/1.35 var(--font-display); }
.haus .photo-frame .icon { width: 28px; height: 28px; color: #8f6d56; }
.haus .agenda { display: grid; gap: 0; }
.haus .agenda-item { display: grid; grid-template-columns: 66px 1fr; gap: 14px; align-items: start; padding-block: 13px; border-bottom: 1px solid var(--line); }
.haus .agenda-item:first-child { padding-top: 0; }
.haus .agenda-item:last-child { border-bottom: 0; padding-bottom: 0; }
.haus .agenda-time { white-space: nowrap; font-size: 12px; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.haus .agenda-item strong { display: block; font-size: 13px; font-weight: 600; }
.haus .agenda-item p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.haus .check-list { display: grid; }
.haus .check-row { display: flex; gap: 11px; align-items: center; min-height: 48px; padding-block: 9px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13px; }
.haus .check-row span { min-width: 0; overflow-wrap: anywhere; }
.haus .check-row:last-child { border-bottom: 0; }
.haus input[type="checkbox"] { appearance: none; width: 19px; height: 19px; border: 1.5px solid var(--control-line); border-radius: 5px; margin: 0; flex: 0 0 auto; cursor: pointer; display: grid; place-items: center; background: var(--surface); }
.haus input[type="checkbox"]:checked { background: var(--action); border-color: var(--action); }
.haus input[type="checkbox"]:checked::after { content: ""; width: 5px; height: 9px; border: solid var(--on-action); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.haus .check-row:has(input:checked) span { text-decoration: line-through; color: var(--muted); }
.haus .list-footer { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.haus .stat-panel { background: var(--leaf-soft); border: 1px solid transparent; }
.haus .stat-panel .eyebrow, .haus .stat-panel .muted { color: var(--leaf); }
.haus .stat { display: flex; gap: 10px; align-items: baseline; margin-block: 11px 3px; }
.haus .stat strong { font: 400 49px/1.1 var(--font-display); letter-spacing: -2px; }
.haus .stat span { font-size: 13px; color: var(--leaf); }
.haus .chart { display: block; width: 100%; height: 98px; margin-top: 20px; overflow: visible; color: var(--leaf); }
.haus .chart text { font: 10px var(--font-body); fill: var(--leaf); }
.haus .chart rect { fill: var(--leaf); }
.haus .quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 26px; padding-block: 23px; border-top: 1px solid var(--line); }
.haus .quick-link { display: flex; text-align: left; gap: 13px; align-items: center; border: 0; color: var(--text); background: transparent; min-height: 54px; padding: 0 8px 0 0; }
.haus .quick-link:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.haus .quick-link > .icon:first-child { color: var(--accent-text); width: 24px; height: 24px; }
.haus .quick-link > .icon:last-child { margin-left: auto; width: 17px; height: 17px; color: var(--muted); }
.haus .quick-link strong { display: block; font-size: 13px; font-weight: 600; }
.haus .quick-link small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.haus .app-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 18px 28px; color: var(--muted); font-size: 11px; }
.haus .footer-motto { font: italic 15px var(--font-display); }
.haus .plan-summary { margin-top: 14px; }
.haus .recipe-disclaimer { margin-top: 20px; }
.haus .shopping-note { margin-top: 18px; }
.haus .planner-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.haus .week-control { display: flex; align-items: center; gap: 10px; }
.haus .week-label { font-weight: 600; min-width: 155px; text-align: center; font-size: 14px; }
.haus .note { padding: 24px; border-radius: 3px 14px 4px 11px; background: var(--ochre-soft); color: var(--ochre); }
.haus .note h3 { font: italic 25px/1.2 var(--font-display); margin-bottom: 10px; }
.haus .note p { font-size: 13px; }
.haus .note .icon { float: right; width: 30px; height: 30px; transform: rotate(12deg); }
.haus .field { display: grid; gap: 7px; }
.haus .field label { font-size: 13px; font-weight: 600; }
.haus .input { width: 100%; min-height: 46px; padding: 11px 12px; color: var(--text); background: var(--surface); border: 1px solid var(--control-line); border-radius: var(--radius-sm); }
.haus .input::placeholder { color: var(--muted); opacity: 1; }
.haus .input[aria-invalid="true"] { border-color: var(--danger); }
.haus .field-error { color: var(--danger); font-size: 12px; }
.haus .notice { padding: 13px 15px; border-radius: var(--radius-sm); background: var(--leaf-soft); color: var(--leaf); font-size: 13px; }
.haus .notice.error { background: var(--danger-soft); color: var(--danger); }
.haus .empty { padding: 30px 20px; border: 1px dashed var(--control-line); border-radius: var(--radius); text-align: center; }
.haus .empty h3 { font: 500 24px/1.25 var(--font-display); margin-bottom: 8px; }
.haus .empty p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.haus .modal { width: min(530px, calc(100% - 32px)); max-height: calc(100dvh - 48px); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; margin: auto; color: var(--text); background: var(--surface); box-shadow: 0 24px 80px #15101e40; }
.haus .modal::backdrop { background: #21182677; backdrop-filter: blur(3px); }
.haus .modal-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.haus .modal-head h2 { font: 500 29px/1.2 var(--font-display); letter-spacing: -.5px; }
.haus .modal .field { margin-bottom: 16px; }
.haus .recipe-option { width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; min-height: 70px; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); }
.haus .recipe-option:last-child { border-bottom: 0; }
.haus .recipe-option:hover { color: var(--accent-text); }
.haus .recipe-option strong { display: block; font-size: 14px; font-weight: 600; }
.haus .recipe-option small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.haus .inline-form { display: flex; align-items: start; gap: 9px; margin-top: 21px; }
.haus .inline-form .field { flex: 1; min-width: 0; margin: 0; }
.haus .inline-form .button { margin-top: 27px; }
.haus .toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 5; width: max-content; max-width: calc(100% - 32px); padding: 13px 21px; border-radius: var(--radius-sm); background: var(--action); color: var(--on-action); font-size: 13px; box-shadow: var(--shadow); pointer-events: none; }
.haus .toast:empty { display: none; }
.haus .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1050px) {
  .haus .shell { width: calc(100% - 48px); }
  .haus .household > span:last-child { display: none; }
  .haus .dashboard { gap: 18px; grid-template-columns: 1fr 1fr; }
  .haus .tonight { grid-column: auto; grid-template-columns: 1fr; min-height: 316px; }
  .haus .tonight-copy { max-width: 88%; }
  .haus .food-art { position: absolute; width: 190px; height: 190px; right: -63px; top: 32px; opacity: .5; }
  .haus .food-note { display: none; }
  .haus .photo-frame img { height: 246px; }
  .haus .stat-panel { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; }
  .haus .stat-panel .chart { margin: 0; }
}
@media (max-width: 720px) {
  .haus .shell { width: calc(100% - 36px); }
  .haus .app-header { flex-wrap: wrap; gap: 16px; min-height: auto; padding-top: 23px; }
  .haus .wordmark { font-size: 29px; }
  .haus .brand-mark { width: 30px; height: 33px; }
  .haus .household { margin-left: auto; }
  .haus .app-nav { order: 3; width: 100%; justify-content: stretch; gap: 6px; padding-bottom: 14px; }
  .haus .nav-button { flex: 1; justify-content: center; padding-inline: 8px; font-size: 12px; }
  .haus .nav-button .icon { width: 17px; height: 17px; }
  .haus .intro { padding-block: 26px 23px; gap: 12px; }
  .haus .intro h1 { font-size: 34px; max-width: 320px; letter-spacing: -1px; }
  .haus .intro .muted { font-size: 13px; }
  .haus .date-stamp { display: none; }
  .haus .dashboard { grid-template-columns: 1fr; gap: 20px; }
  .haus .tonight { grid-template-columns: 1fr; min-height: 280px; padding: 24px; }
  .haus .tonight-copy { max-width: 100%; }
  .haus .tonight h2 { max-width: 235px; font-size: 30px; }
  .haus .food-art { width: 170px; height: 170px; top: 51px; right: -68px; opacity: .4; }
  .haus .tonight .actions { gap: 5px; padding-top: 25px; }
  .haus .photo-frame { grid-row: 5; margin: 1px 8px 5px; }
  .haus .photo-frame img { height: auto; aspect-ratio: 4/3; }
  .haus .panel { padding: 22px; }
  .haus .stat-panel { grid-column: auto; grid-template-columns: 1fr; gap: 14px; }
  .haus .stat-panel .chart { height: 98px; }
  .haus .stat strong { font-size: 43px; }
  .haus .stat-panel .eyebrow { font-size: 10px; letter-spacing: 1.2px; }
  .haus .stat-panel .small { font-size: 12px; }
  .haus .quick-links { grid-template-columns: 1fr; gap: 14px; padding-top: 19px; margin-top: 20px; }
  .haus .quick-link { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .haus .quick-link:last-child { border-bottom: 0; padding-bottom: 0; }
  .haus .app-footer { align-items: start; font-size: 10px; }
  .haus .planner-top { gap: 11px; }
  .haus .week-control { flex: 1; justify-content: space-between; gap: 4px; }
  .haus .planner-top > .button { width: 100%; }
  .haus .modal { padding: 22px; max-height: calc(100dvh - 32px); }
  .haus .modal-head h2 { font-size: 26px; }
  .haus .toast { bottom: 14px; }
}
.haus .meal-nav { display: flex; align-items: center; gap: 8px; padding-bottom: 22px; }
.haus .meal-nav .button[aria-pressed="false"] { color: var(--muted); background: transparent; border-color: var(--line); }
.haus .meal-nav .button[aria-pressed="false"]:hover { color: var(--text); background: var(--surface-soft); }
.haus .meal-nav-note { margin-left: auto; font: italic 16px var(--font-display); color: var(--accent-text); }
.haus .week-list { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.haus .day-row { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.haus .day-row.is-today { border: 2px solid var(--accent-text); }
.haus .day-top { display: flex; align-items: center; gap: 9px; justify-content: space-between; padding: 10px 15px; min-height: 53px; }
.haus .is-today .day-top { background: var(--accent-soft); }
.haus .day-label { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted); }
.haus .day-label strong { font-size: 13px; color: var(--text); font-weight: 650; }
.haus .day-top .button { min-height: 32px; width: 32px; padding: 5px; }
.haus .day-content { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.haus .meal-photo { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; background: var(--surface-soft); }
.haus .day-photo-button { border: 0; padding: 0; display: block; background: var(--surface-soft); width: 100%; }
.haus .day-photo-button .meal-photo { aspect-ratio: 16/10; }
.haus .day-copy { padding: 16px; }
.haus .meal-title { display: block; border: 0; padding: 0; background: transparent; color: var(--text); text-align: left; font: 500 21px/1.2 var(--font-display); letter-spacing: -.35px; min-height: 44px; }
.haus button.meal-title:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px; }
.haus .meal-subtitle { color: var(--muted); font-size: 12px; margin-top: 10px; }
.haus .open-dinner { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 268px; padding: 24px; text-align: center; background: transparent; color: var(--accent-text); border: 0; }
.haus .open-dinner:hover { background: var(--accent-soft); }
.haus .open-dinner .icon { width: 40px; height: 40px; padding: 10px; border: 1px dashed var(--control-line); border-radius: 50%; }
.haus .open-dinner strong { font: 500 23px/1.2 var(--font-display); }
.haus .open-dinner small { font-size: 12px; color: var(--muted); }
.haus .leftovers-card { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; background: var(--ochre-soft); color: var(--ochre); min-height: 268px; }
.haus .leftovers-card .icon { width: 47px; height: 47px; margin-bottom: 18px; transform: rotate(-9deg); }
.haus .leftovers-card h3 { font: italic 26px/1.2 var(--font-display); margin-bottom: 12px; }
.haus .leftovers-card p { font-size: 12px; max-width: 160px; }
.haus .week-note { display: flex; align-items: center; gap: 13px; margin-top: 22px; color: var(--muted); font-size: 13px; }
.haus .week-note .icon { color: var(--ochre); transform: rotate(9deg); }
.haus .recipe-toolbar { display: flex; align-items: end; gap: 20px; margin-bottom: 25px; }
.haus .recipe-toolbar .field { width: min(100%,420px); }
.haus .recipe-toolbar > p { margin-left: auto; padding-bottom: 10px; }
.haus .recipe-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.haus .recipe-card { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.haus .recipe-card-image { border: 0; padding: 0; display: block; width: 100%; background: var(--surface-soft); }
.haus .recipe-card-image .meal-photo { aspect-ratio: 16/10; }
.haus .recipe-card-body { flex: 1; display: flex; flex-direction: column; align-items: start; padding: 22px; }
.haus .recipe-card h2 { font: 500 27px/1.15 var(--font-display); letter-spacing: -.5px; margin-bottom: 10px; }
.haus .recipe-card h2 button { padding: 0; background: transparent; border: 0; color: var(--text); text-align: left; font: inherit; }
.haus .recipe-card h2 button:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px; }
.haus .recipe-card-description { color: var(--muted); font-size: 13px; margin-bottom: 17px; }
.haus .recipe-card .actions { margin-top: auto; padding-top: 19px; gap: 6px; width: 100%; justify-content: space-between; }
.haus .recipe-card .button.quiet { padding-inline: 0; }
.haus .recipe-card .tag { margin-top: 2px; }
.haus .recipe-add { font-size: 12px; }
.haus .recipe-detail-head { padding-block: 22px 28px; }
.haus .recipe-back { margin-bottom: 22px; }
.haus .recipe-detail-title { font: 500 clamp(35px,4vw,52px)/1.1 var(--font-display); letter-spacing: -1.3px; max-width: 800px; margin-block: 9px 13px; }
.haus .recipe-subtitle { color: var(--muted); font-size: 17px; max-width: 740px; }
.haus .recipe-detail-head .actions { margin-top: 12px; flex-direction: column; align-items: flex-start; gap: 22px; }
.haus .recipe-detail-grid { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(275px,1fr); gap: 26px; align-items: start; }
.haus .recipe-detail-photo { border-radius: var(--radius); aspect-ratio: 4/3; }
.haus .recipe-details { margin: 0; }
.haus .recipe-details > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: 13px; font-size: 13px; }
.haus .recipe-details dt { color: var(--muted); }
.haus .recipe-details dd { margin: 0; text-align: right; font-weight: 600; }
.haus .recipe-method { grid-column: 1; grid-row: 2; }
.haus .recipe-sidebar { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 22px; }
.haus .method-list { list-style: none; margin: 0; padding: 0; counter-reset: method; }
.haus .method-list li { counter-increment: method; position: relative; padding-left: 43px; margin-top: 25px; font-size: 14px; }
.haus .method-list li::before { content: counter(method,decimal-leading-zero); position: absolute; left: 0; top: -2px; color: var(--accent-text); font: 500 23px var(--font-display); }
.haus .method-list li strong { display: block; font-size: 14px; margin-bottom: 6px; }
.haus .method-list li p { color: var(--muted); }
.haus .ingredient-caption { color: var(--muted); font-size: 12px; margin-top: -6px; margin-bottom: 12px; }
.haus .recipe-option { gap: 13px; }
.haus .recipe-option .meal-photo { width: 80px; height: 68px; aspect-ratio: auto; border-radius: 7px; flex: 0 0 auto; }
.haus .recipe-option > span:first-of-type { flex: 1; }
.haus .plan-preview { margin-block: 15px 22px; font-size: 13px; color: var(--muted); }
.haus .plan-status { margin-top: 13px; font-size: 13px; color: var(--leaf); }
@media(max-width:1050px) {
  .haus .week-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .haus .recipe-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .haus .recipe-detail-grid { grid-template-columns: minmax(0,1.5fr) minmax(255px,1fr); gap: 20px; }
}
@media(max-width:720px) {
  .haus .meal-nav-note { display: none; }
  .haus .meal-nav { padding-bottom: 18px; }
  .haus .week-list { grid-template-columns: 1fr; gap: 16px; }
  .haus .day-top { min-height: 53px; padding: 5px 14px; }
  .haus .day-top .button { width: 44px; min-height: 44px; padding: 10px; }
  .haus .day-content { display: grid; grid-template-columns: 116px minmax(0,1fr); align-items: stretch; }
  .haus .day-photo-button .meal-photo { height: 100%; min-height: 132px; aspect-ratio: auto; }
  .haus .day-copy { padding: 16px 14px; }
  .haus .meal-title { font-size: 21px; }
  .haus .meal-subtitle { font-size: 11px; }
  .haus .open-dinner { min-height: 150px; padding: 20px; }
  .haus .leftovers-card { min-height: 150px; padding: 20px; }
  .haus .leftovers-card .icon { width: 28px; height: 28px; margin-bottom: 8px; }
  .haus .leftovers-card h3 { font-size: 23px; margin-bottom: 8px; }
  .haus .leftovers-card p { max-width: none; }
  .haus .recipe-toolbar { flex-wrap: wrap; gap: 9px; }
  .haus .recipe-toolbar .field { width: 100%; }
  .haus .recipe-toolbar > p { margin-left: 0; padding: 0; font-size: 12px; }
  .haus .recipe-grid { grid-template-columns: 1fr; gap: 22px; }
  .haus .recipe-card h2 { font-size: 28px; }
  .haus .recipe-detail-head { padding-block: 15px 22px; }
  .haus .recipe-detail-title { font-size: 36px; }
  .haus .recipe-subtitle { font-size: 15px; }
  .haus .recipe-detail-head .actions .button { align-self: stretch; }
  .haus .recipe-detail-grid { grid-template-columns: 1fr; gap: 20px; }
  .haus .recipe-detail-photo { aspect-ratio: 4/3; }
  .haus .recipe-sidebar { grid-column: 1; grid-row: 2; gap: 20px; }
  .haus .recipe-method { grid-row: 3; }
  .haus .recipe-option .meal-photo { width: 62px; height: 62px; }
}

/* App shell: the guide supplies --app-offset; standalone apps default to 0. */
.haus .app-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); min-height: calc(100dvh - var(--app-offset, 0px)); }
.haus .app-content { min-width: 0; container: workspace / inline-size; }
.haus .app-content > .shell { width: min(calc(100% - 64px), var(--content-width)); }
.haus .sidebar-host { background: var(--surface); border-right: 1px solid var(--line); }
.haus .sidebar { position: sticky; top: var(--app-offset, 0px); height: calc(100dvh - var(--app-offset, 0px)); padding: 28px 18px 18px; display: flex; flex-direction: column; gap: 30px; overflow-y: auto; }
.haus .sidebar .brand { padding: 0 5px; gap: 8px; }
.haus .sidebar .brand-mark { width: 30px; height: 34px; }
.haus .sidebar .brand[data-logo] .wordmark { font-size: 25px; }
.haus .sidebar-label { padding-inline: 14px; font-size: 10px; letter-spacing: 1.6px; color: var(--muted); text-transform: uppercase; }
.haus .sidebar .app-nav { display: grid; gap: 5px; margin-top: 12px; }
.haus .sidebar .nav-button { width: 100%; justify-content: flex-start; text-align: left; padding: 12px 14px; min-height: 48px; }
.haus .sidebar .nav-button .icon { width: 20px; height: 20px; }
.haus .sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.haus .account-button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 6px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); text-align: left; }
.haus .account-button:hover { background: var(--surface-soft); }
.haus .account-button .avatar { width: 38px; height: 38px; flex-shrink: 0; }
.haus .account-copy { min-width: 0; flex: 1; }
.haus .account-copy strong { display: block; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.haus .account-copy small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.haus .account-button > .icon { width: 17px; height: 17px; color: var(--muted); }
.haus .sidebar-close, .haus .app-header { display: none; }
.haus .sidebar-drawer { padding: 0; margin: 0; width: min(320px,calc(100% - 36px)); max-width: none; height: 100dvh; max-height: none; border: 0; border-right: 1px solid var(--line); border-radius: 0; }
.haus .sidebar-drawer .sidebar { position: static; height: 100%; padding-top: 20px; }
.haus .sidebar-drawer .sidebar-close { display: inline-flex; align-self: flex-end; margin-bottom: -16px; }
.haus .sidebar-drawer .app-nav { order: initial; padding: 0; }
.haus .sidebar-drawer .nav-button { font-size: 14px; }
.haus .skip-link { position: absolute; left: 16px; top: 8px; z-index: 6; transform: translateY(-200%); }
.haus .skip-link:focus { transform: none; }

/* Shared forms. A field owns its label, control, hint, and validation message. */
.haus .settings-layout { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 24px; align-items: start; margin-bottom: 30px; }
.haus .form-stack { display: grid; gap: 24px; min-width: 0; }
.haus .form-group { padding: 0; margin: 0; border: 0; min-width: 0; }
.haus .form-group > legend { padding: 0; font: 500 24px/1.25 var(--font-display); margin-bottom: 8px; }
.haus .form-description { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.haus .form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.haus .field { min-width: 0; }
.haus .field-wide { grid-column: 1 / -1; }
.haus .field label .optional { color: var(--muted); font-weight: 400; }
.haus .field-hint { font-size: 12px; color: var(--muted); }
.haus textarea.input { min-height: 106px; resize: vertical; }
.haus .input:disabled, .haus .input[readonly] { background: var(--surface-soft); color: var(--muted); }
.haus .input:disabled { cursor: not-allowed; }
.haus .input[aria-invalid="true"] { box-shadow: 0 0 0 1px var(--danger); }
.haus .choice-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.haus .choice-group legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.haus .choice-row { display: flex; align-items: center; gap: 11px; min-height: 48px; font-size: 13px; cursor: pointer; }
.haus .choice-row > span { min-width: 0; }
.haus .choice-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.haus input[type="radio"] { accent-color: var(--action); width: 20px; height: 20px; margin: 0; flex-shrink: 0; }
.haus input.switch { width: 40px; height: 24px; border-radius: 20px; position: relative; display: block; }
.haus input.switch::after { content: ""; position: absolute; width: 16px; height: 16px; top: 2.5px; left: 3px; border: 0; border-radius: 50%; background: var(--muted); transform: none; }
.haus input.switch:checked::after { left: 18px; width: 16px; height: 16px; border: 0; background: var(--on-action); transform: none; }
.haus .form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.haus .form-status { font-size: 13px; color: var(--leaf); }
.haus .notice.warning { color: var(--ochre); background: var(--ochre-soft); }
.haus .account-detail { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.haus .account-detail strong { font-weight: 600; }
.haus .summary-list { margin: 0; display: grid; gap: 16px; font-size: 13px; }
.haus .summary-list dt { color: var(--muted); font-size: 12px; }
.haus .summary-list dd { margin: 3px 0 0; overflow-wrap: anywhere; }

/* Dashboard pieces are independent of meals: metrics, progress, rows, tables. */
.haus .metric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.haus .metric-label { font-size: 13px; color: var(--muted); }
.haus .metric-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-block: 9px 6px; }
.haus .metric-value strong { font: 500 40px/1.15 var(--font-display); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.haus .metric-value span { font-size: 13px; color: var(--muted); }
.haus .metric-note { font-size: 12px; color: var(--muted); }
.haus .progress { display: block; appearance: none; width: 100%; height: 7px; border: 0; border-radius: 6px; overflow: hidden; background: var(--surface-soft); color: var(--action); margin-top: 16px; }
.haus .progress::-webkit-progress-bar { background: var(--surface-soft); }
.haus .progress::-webkit-progress-value { background: var(--action); border-radius: 6px; }
.haus .progress::-moz-progress-bar { background: var(--action); border-radius: 6px; }
.haus .widget-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 24px; margin-block: 24px; }
.haus .widget-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.haus .widget-toolbar h2, .haus .widget-toolbar h3 { font: 500 23px/1.25 var(--font-display); }
.haus .compact-field { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.haus .compact-field .input { width: auto; min-width: 120px; }
.haus .table-scroll { overflow-x: auto; max-width: 100%; }
.haus .data-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.haus .data-table caption { text-align: left; font-size: 12px; color: var(--muted); padding-bottom: 12px; }
.haus .data-table th { font-size: 11px; font-weight: 600; color: var(--muted); padding: 0 12px 11px; border-bottom: 1px solid var(--line); }
.haus .data-table td { padding: 15px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.haus .data-table tr:last-child td { border-bottom: 0; }
.haus .data-table th:first-child, .haus .data-table td:first-child { padding-left: 0; }
.haus .data-table th:last-child, .haus .data-table td:last-child { padding-right: 0; text-align: right; }
.haus .data-table td strong { display: block; font-weight: 600; }
.haus .data-table td small { color: var(--muted); font-size: 11px; }
.haus .data-table .numeric { font-variant-numeric: tabular-nums; }
.haus .activity-list { list-style: none; padding: 0; margin: 0; }
.haus .activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.haus .activity-item:first-child { padding-top: 0; }
.haus .activity-item:last-child { padding-bottom: 0; border-bottom: 0; }
.haus .activity-item > .icon { color: var(--accent-text); margin-top: 2px; }
.haus .activity-item p { font-size: 13px; }
.haus .activity-item time { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.haus .chart-values { font-size: 12px; color: var(--muted); margin-top: 16px; }
.haus .chart-values summary { cursor: pointer; padding-block: 8px; }

@container workspace (max-width:1050px) {
  .haus .dashboard { grid-template-columns: 1fr 1fr; gap: 20px; }
  .haus .tonight { grid-column: auto; grid-template-columns: 1fr; min-height: 316px; }
  .haus .tonight-copy { max-width: 100%; }
  .haus .food-art { position: absolute; width: 190px; height: 190px; right: -80px; top: 32px; opacity: .4; }
  .haus .food-note { display: none; }
  .haus .stat-panel { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; }
  .haus .photo-frame img { height: 250px; }
  .haus .week-list, .haus .recipe-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .haus .recipe-detail-grid { grid-template-columns: minmax(0,1.5fr) minmax(240px,1fr); gap: 20px; }
  .haus .settings-layout { grid-template-columns: 1fr; }
  .haus .settings-account { max-width: none; }
}
@media(max-width:980px) {
  .haus .app-layout { display: block; }
  .haus .sidebar-host { display: none; }
  .haus .app-header { display: flex; min-height: 84px; padding: 0; flex-wrap: nowrap; gap: 12px; }
  .haus .app-header .brand { margin-right: auto; }
  .haus .app-content > .shell { width: calc(100% - 48px); }
  .haus .settings-layout { grid-template-columns: 1fr; }
}
@media(max-width:720px) {
  .haus .app-content > .shell { width: calc(100% - 36px); }
  .haus .form-grid, .haus .metric-grid, .haus .widget-grid { grid-template-columns: 1fr; }
  .haus .form-actions .button { flex: 1; }
  .haus .field .input { font-size: 16px; }
  .haus .widget-toolbar { gap: 12px; }
  .haus .compact-field { width: 100%; }
  .haus .compact-field .input { flex: 1; }
  .haus .data-table th, .haus .data-table td { padding-inline: 6px; }
}
@container workspace (max-width:720px) {
  .haus .dashboard, .haus .week-list, .haus .recipe-grid, .haus .recipe-detail-grid { grid-template-columns: 1fr; }
  .haus .stat-panel { grid-column: auto; grid-template-columns: 1fr; }
  .haus .recipe-sidebar { grid-column: 1; grid-row: 2; }
  .haus .recipe-method { grid-row: 3; }
  .haus .photo-frame img { height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .haus *, .haus *::before, .haus *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
