/* Purpose: responsive, accessible visual design for A moment's two tabs (Moment, Memory), Settings, the header's profile menu and the pinned footer, phone to desktop, with no external fonts or assets. */
:root{
  --green:#244c3d;--green-hover:#34634e;--ink:#24352f;--muted:#5d6b63;--line:#dce2d8;--pill-line:#cfd8c8;
  --ground:#f7f7f1;--card:#eaf0e3;--field:#fbfcf8;--soft:#eff2e9;--rail:#cbd9bd;--focus:#91a85b;
  --attention-bg:#f2eedf;--attention-line:#ddd1ab;--dot:#b3861b;
  /* The pinned footer's height; the page is padded by it so nothing hides behind it. */
  --footer-h:44px;--footer-space:var(--footer-h);
  --serif:Georgia,"Times New Roman",serif;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;color:var(--ink);background:var(--ground);font-synthesis:none;line-height:1.55
}
*{box-sizing:border-box}
body{margin:0;background:var(--ground);overflow-x:hidden;padding-bottom:var(--footer-space)}
[hidden]{display:none!important}
button,input,textarea,select{font:inherit}
a{color:var(--green)}a:hover{color:var(--green-hover)}
h1,h2,h3,p{margin-top:0}
h1{font-family:var(--serif);font-weight:400;font-size:34px;line-height:1.15;letter-spacing:-.8px;margin-bottom:18px}
h2{font-family:var(--serif);font-weight:400;font-size:24px;line-height:1.25;margin-bottom:14px}
h3{font-size:15px;font-weight:600;margin-bottom:10px}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
h1[tabindex="-1"]:focus,h2[tabindex="-1"]:focus{outline:none}
.sr-only,.skip:not(:focus){position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip:focus{display:block;padding:12px}
.muted{color:var(--muted)}.small{font-size:13px}
.plain{list-style:none;margin:0;padding:0}

/* Buttons. 44px is the smallest target anywhere on the page. */
button{cursor:pointer;border:0;border-radius:999px;font-size:14px;font-weight:550;min-height:44px;padding:0 18px;transition:background .15s}
button:disabled{opacity:.5;cursor:wait}
.primary{background:var(--green);color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:12px}
.primary:hover{background:var(--green-hover)}
.secondary{background:#fff;border:1px solid var(--pill-line);color:var(--green)}
.secondary:hover,.quiet:hover,.icon-button:hover,.soft:hover{background:#e8ede3}
.quiet,.icon-button{background:transparent;color:var(--green)}
.soft{background:var(--soft);color:var(--green);font-weight:600}
.icon-button{width:44px;padding:0;font-size:18px}
.pill{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--pill-line);color:var(--green);font-weight:500}
.voice-actions,.page-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.voice-actions a{display:inline-flex;align-items:center;min-height:44px;border-radius:999px;padding:0 16px;font-size:14px;font-weight:550;text-decoration:none}
.page-actions{margin:14px 0}

/* Header. The nav only makes sense once signed in. The wordmark has been two words
   since the 2026-09-25 rename; it never wraps or shrinks, so it always reads as one line. */
.masthead{max-width:1280px;margin:auto;padding:18px 64px;display:flex;align-items:center;gap:32px;border-bottom:1px solid var(--line)}
.wordmark{min-height:44px;font-family:var(--serif);font-size:34px;letter-spacing:-1.2px;word-spacing:1px;white-space:nowrap;flex:none;text-decoration:none;color:var(--green);display:flex;align-items:baseline;gap:4px}
.brand-dot{height:7px;width:7px;border-radius:50%;background:#9bab5d}
.masthead-note{font-size:13px;color:var(--muted)}
.main-nav{display:flex;gap:6px}
.main-nav a{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 16px;border-radius:999px;text-decoration:none;font-size:14px;font-weight:500}
.main-nav a[aria-current="page"]{background:var(--green);color:#fff}
body:has(#workspace[hidden]) .main-nav{display:none!important}
body:has(#workspace:not([hidden])) .masthead-note{display:none}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--dot);margin-left:8px;flex:none}
.main-nav a[aria-current="page"] .dot{box-shadow:0 0 0 2px #fff}
/* The profile menu (web/profile-menu.mjs), top right at every width. Its `hidden` is set by
   the page: signed in, or in the app while a device sign-out may still be needed. */
.profile{position:relative;flex:none;margin-left:auto}
.profile-button{position:relative;width:44px;height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid var(--pill-line);background:#fff;color:var(--green)}
.profile-button:not([aria-expanded="true"]):hover{background:#e8ede3}
.profile-button[aria-expanded="true"],body:has(#view-settings:not([hidden])) .profile-button{background:var(--green);color:#fff;border-color:var(--green)}
.profile-button .dot{position:absolute;top:2px;right:2px;margin:0;box-shadow:0 0 0 2px #fff}
.profile-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:20;min-width:210px;margin:0;padding:6px;list-style:none;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px rgba(36,53,47,.16)}
.profile-menu [role="menuitem"]{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;padding:0 14px;border-radius:8px;background:transparent;color:var(--green);font-size:14px;font-weight:500;text-decoration:none;text-align:left}
.profile-menu [role="menuitem"]:hover,.profile-menu [role="menuitem"]:focus{background:var(--card);color:var(--green)}
.profile-menu [role="menuitem"]:focus-visible{outline-offset:-3px}

main{max-width:1280px;margin:auto;padding:36px 64px 56px}
.notice,.banner{background:var(--attention-bg);border:1px solid var(--attention-line);border-radius:10px;padding:14px 20px;font-size:14px;margin-bottom:24px}
.banner{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.banner p{margin:0;flex:1 1 280px}.banner a{font-weight:600;min-height:44px;display:inline-flex;align-items:center}

/* Signed out. */
.welcome{max-width:720px;padding:50px 0 65px}
.welcome h1{font-size:74px;letter-spacing:-3px;line-height:1.06}
.eyebrow{font-size:10px;font-weight:650;letter-spacing:2.1px;color:var(--muted);margin-bottom:18px}
.intro{font-size:19px;color:var(--muted);max-width:490px;margin:28px 0}
.welcome .primary{margin:10px 0 20px;padding:0 23px;min-height:52px}
.welcome>.muted{font-size:12px}
.android-download{font-size:14px;margin:28px 0 0;padding-top:20px;border-top:1px solid var(--line)}
.android-download a{font-weight:600;min-height:44px;display:inline-flex;align-items:center}
.android-download .muted{font-size:12px}

/* The sign-in dialog (web/signin-dialog.mjs): Zitadel's login in a frame over the welcome page,
   only where web and login share a site. Hidden until showModal(); a phone gets the full screen. */
.signin-dialog{width:min(480px,calc(100vw - 32px));height:min(720px,calc(100dvh - 32px));max-width:none;max-height:none;padding:0;border:1px solid var(--line);border-radius:16px;background:var(--ground);color:var(--ink);box-shadow:0 24px 64px rgba(36,53,47,.28);overflow:hidden}
.signin-dialog[open]{display:flex;flex-direction:column}
.signin-dialog::backdrop{background:rgba(36,53,47,.45)}
.signin-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 10px 10px 24px;border-bottom:1px solid var(--line)}
.signin-dialog-head h2{margin:0;font-size:20px}
.signin-frame{flex:1;width:100%;min-height:0;border:0;background:#fff}
.signin-dialog-foot{margin:0;padding:6px 16px 8px 24px;border-top:1px solid var(--line);font-size:13px;display:flex;align-items:center;flex-wrap:wrap;gap:4px}
.signin-dialog-foot .quiet{padding:0 10px;font-size:13px}
.signin-dialog button:focus-visible{outline-offset:-3px}
@media(max-width:640px){.signin-dialog{width:100vw;height:100dvh;border:0;border-radius:0;margin:0}}

/* The Moment tab. */
.home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:48px;row-gap:28px;align-items:start}
.home-side{display:flex;flex-direction:column;gap:28px;min-width:0}
/* The one Ask box heads the Memory view (owner decisions 2026-09-25 and -26): the answer
   under the box, the matching moments under that. */
.ask-panel{min-width:0;padding:22px 24px;background:var(--card);border-radius:16px}
.phone-tabs{display:none}
.capture-card{display:flex;flex-direction:column;gap:14px;padding:28px;background:var(--card);border-radius:16px}
.capture-card h1{margin:0}
.capture-card h2{font-family:inherit;font-size:15px;font-weight:600;margin:0 0 10px}
.capture-card textarea{display:block;width:100%;resize:vertical;min-height:150px;border:0;border-radius:10px;background:var(--field);padding:18px;font-size:15px;line-height:1.7;color:var(--ink)}
.capture-card textarea::placeholder{color:#79867a}
.capture-actions{display:flex;align-items:center;gap:8px;margin-top:14px}
.capture-actions .save{margin-left:auto;padding:0 22px;font-weight:600}
.capture-extra{padding-top:14px;border-top:1px solid #d3dccb}
#voice-preview{display:block;width:100%;margin:14px 0}#voice-status{margin:12px 0}
#photo-file{max-width:100%}
.capture-note{margin:0}
.capture-status{border-top:1px solid #ccd8c3;padding-top:14px;font-size:13px;overflow-wrap:anywhere}
.pill-form{display:flex;gap:8px;padding:6px;border:1px solid var(--line);border-radius:999px;background:#fff}
.pill-form input{flex:1;min-width:0;border:0;padding:0 16px;font-size:15px;background:transparent;color:var(--ink)}
.pill-form input:focus-visible{outline-offset:-3px;border-radius:999px}
.ask-panel .search-options{margin-top:10px}
.ask-panel .small{margin:10px 0 0}
#ask-answer{overflow-wrap:anywhere}
#ask-answer:not(:empty){margin-top:14px;padding-top:14px;border-top:1px solid #d3dccb}
.answer-block p{margin:0 0 4px}.answer-block+.answer-block{margin-top:14px}
.answer-block p:nth-child(2){font-size:15px;line-height:1.7}
.needs-you{display:flex;flex-direction:column;gap:14px;padding:18px 20px;border:1px solid var(--line);border-radius:12px;background:#fff}
.label-heading{font-family:inherit;font-size:12px;font-weight:600;letter-spacing:1.2px;text-transform:uppercase;color:var(--muted);margin:0}
.needs-you h3{font-size:14px}
.nudge-card,.suggest-card{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:10px 0;border-top:1px solid var(--line)}
.nudge-card strong,.suggest-card strong{flex:1 1 100%;font-weight:500}
.nudge-card p{margin:0;flex:1 1 100%}
.suggest-option{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;flex:1 1 100%}.suggest-option>span{flex:1 1 auto}.suggest-option>p{flex:1 1 100%;order:1}
.suggest-option p{margin:0}

/* Memory. */
.view-narrow{max-width:820px;margin:0 auto}
.recall-panel{display:flex;flex-direction:column;gap:18px}
.search-options{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;color:var(--muted)}
.search-options:not(:has(button:not([hidden]))){display:none}
.day-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-bottom:18px;border-bottom:1px solid var(--line)}
.day-nav h2{margin:0;font-size:30px;letter-spacing:-.6px}
/* The day heading is the date picker's trigger (owner decision 2026-09-26): it has to
   look tappable, so it is a pill with a calendar icon that answers hover and focus. */
.day-heading{position:relative;min-width:0}
.day-picker{display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:2px 16px 2px 14px;border-radius:14px;background:transparent;border:1px solid transparent;color:var(--ink);font:inherit;font-weight:inherit;letter-spacing:inherit;text-align:left;cursor:pointer;text-decoration:underline;text-decoration-color:var(--rail);text-decoration-thickness:2px;text-underline-offset:6px}
.day-picker svg{flex:none;color:var(--green)}
.day-picker:hover{background:#fff;border-color:var(--pill-line);text-decoration-color:var(--green)}
.day-picker:focus-visible{background:#fff;border-color:var(--green)}
/* Rendered (showPicker() refuses display:none) but invisible; the picker opens by the heading. */
.picker-input{position:absolute;left:0;bottom:0;width:1px;height:1px;padding:0;border:0;opacity:0;pointer-events:none}
.day-tools{display:flex;align-items:center;gap:4px;margin-left:auto;flex-wrap:wrap}
.tabs{display:flex;gap:4px;padding:4px;width:fit-content;max-width:100%;overflow-x:auto;background:var(--card);border-radius:999px}
.tabs [role="tab"]{background:transparent;color:var(--green);font-weight:500;white-space:nowrap;padding:0 16px}
.tabs [role="tab"][aria-selected="true"]{background:#fff;font-weight:600}
.view-label{font-size:13px;font-weight:600;margin:0 0 6px}
.results{margin-top:18px}
.memory{padding:0 0 22px 20px;margin-bottom:22px;border-left:2px solid var(--rail)}
.memory time{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.memory blockquote{margin:6px 0 12px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.75}
.memory details{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.memory summary{cursor:pointer;min-height:44px;display:flex;align-items:center}
.memory details p{margin:8px 0}
.memory>details+details{margin-top:4px}
.memory textarea{width:100%;border:1px solid var(--line);border-radius:8px;padding:10px;background:#fff}
.memory select{min-height:44px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--green);margin-right:6px}
.empty{padding:36px 24px;border:1px dashed #d0dac8;border-radius:10px;text-align:center;color:var(--muted);font-size:14px}
.load-more{width:100%}
.excerpts-panel{padding:20px;border:1px solid var(--line);border-radius:12px;background:#fff}
.excerpts-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.excerpts-heading h3{font-size:17px;margin:0}
.excerpts-panel>.small{margin:12px 0 0}
.excerpts-panel .memory{margin:20px 0 0;padding-bottom:8px}
.excerpts-panel .memory blockquote{font-size:14px}

/* Settings. */
.settings-grid{display:grid;grid-template-columns:240px minmax(0,1fr);gap:56px}
.settings-nav ul{display:flex;flex-direction:column;gap:2px;position:sticky;top:16px}
.settings-nav a{display:flex;justify-content:space-between;align-items:center;min-height:44px;padding:0 14px;border-radius:10px;text-decoration:none;font-size:14px}
.settings-nav a[aria-current="page"]{background:var(--card);font-weight:600}
.settings-body{max-width:760px;min-width:0}
.settings-section{display:flex;flex-direction:column;gap:28px}
.settings-section h1{margin:0}
.settings-section h2{font-family:inherit;font-size:17px;font-weight:600;margin:0 0 10px}
.settings-section h3{font-size:14px;margin:14px 0 8px}
.panel{overflow-wrap:anywhere}
.panel>*+*{margin-top:10px}
.panel p{margin-bottom:0}
.panel label{display:block;font-size:13px;margin-top:12px}
.panel input[type="text"],.panel input:not([type]){display:block;width:100%;max-width:420px;min-height:44px;border:1px solid var(--line);border-radius:8px;padding:0 12px;background:#fff;color:var(--ink)}
.panel details{font-size:14px}.panel summary{cursor:pointer;min-height:44px;display:flex;align-items:center;color:var(--green);font-weight:500}
.inline-form{display:flex;gap:8px;flex-wrap:wrap}.inline-form input{flex:1 1 220px}
.card{display:flex;flex-direction:column;gap:12px;padding:24px;background:#fff;border:1px solid var(--line);border-radius:14px}
.card-attention{border-color:var(--attention-line)}
.card>*{margin:0}.card .primary{align-self:flex-start}
.processor-row,.retention-row,.entity-row,.dead-letter{padding:12px 0;border-top:1px solid var(--line);font-size:14px}

/* Pinned to the bottom edge of the window on both tabs (owner decision 2026-09-26); the
   body is padded by --footer-space so content scrolls above it, never behind it. */
footer{position:fixed;left:0;right:0;bottom:0;z-index:9;display:flex;align-items:center;min-height:var(--footer-h);padding:0 max(24px,calc((100% - 1152px)/2));background:var(--ground);border-top:1px solid var(--line);color:var(--muted);font-size:11px;letter-spacing:.3px}
footer span{margin:0 12px}

@media(max-width:900px){
  .masthead{padding:16px 24px;gap:20px}.masthead-note{display:none}
  main{padding:28px 24px 48px}
  .home-grid{grid-template-columns:1fr;row-gap:32px}
  .settings-grid{grid-template-columns:1fr;gap:24px}
  .settings-nav ul{position:static;flex-direction:row;flex-wrap:wrap;gap:6px}
  .settings-nav a{border:1px solid var(--line);border-radius:999px;background:#fff}
  .welcome h1{font-size:57px}.welcome{padding:30px 0}.intro{font-size:17px}
}
/* Phone (plan 2026-09-25-capture-context, C4): the main nav gives way to two screens,
   Moment and Memory, switched by the tabs or a swipe; Settings stays in the profile menu. */
@media(max-width:640px){
  .masthead{padding:10px 16px;gap:12px}
  .wordmark{font-size:26px;letter-spacing:-1px}
  .main-nav{display:none}
  .phone-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin-bottom:18px;background:var(--card);border-radius:999px}
  .phone-tabs [role="tab"]{background:transparent;color:var(--green);font-weight:500}
  .phone-tabs [role="tab"][aria-selected="true"]{background:#fff;font-weight:600}
  #view-home,#view-memories{touch-action:pan-y pinch-zoom}
  .ask-panel{padding:16px}
  /* The app keeps a bottom tab bar, Moment and Memory; the footer sits just above it. */
  .main-nav[data-native="true"]{position:fixed;left:0;right:0;bottom:0;z-index:10;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;background:#fff;border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
  .main-nav[data-native="true"] a{justify-content:center;border-radius:0;min-height:56px;font-size:13px;color:var(--muted)}
  .main-nav[data-native="true"] a[aria-current="page"]{background:#fff;color:var(--green);font-weight:600}
  body:has(.main-nav[data-native="true"]){--footer-space:calc(var(--footer-h) + 57px + env(safe-area-inset-bottom))}
  /* Tucked 3px under the bar (which is above it), so no sliver of content shows between them. */
  body:has(.main-nav[data-native="true"]) footer{bottom:calc(54px + env(safe-area-inset-bottom))}
  main{padding:18px 16px 32px}
  h1{font-size:26px}
  .welcome h1{font-size:44px;letter-spacing:-1.5px}
  .capture-card{padding:18px}
  .capture-card textarea{min-height:110px}
  .capture-actions .pill{width:48px;height:48px;padding:0;justify-content:center;font-size:0;gap:0}
  .capture-actions .pill svg{width:20px;height:20px}
  .day-nav h2{font-size:22px}
  /* One row for previous, the day and next; Today on the row below. */
  .day-nav{flex-wrap:wrap}
  .day-heading{flex:1 1 0}
  .day-picker{padding:2px 8px;gap:6px}
  .day-tools{margin-left:0;width:100%}
  .tabs{width:100%}
  .tabs [role="tab"]{padding:0 10px;font-size:13px}
  .settings-nav a{padding:0 12px}
  footer{padding:0 16px}
}
@media(max-width:640px) and (prefers-reduced-motion:no-preference){
  #view-memories:not([hidden]){animation:screen-from-right .18s ease-out}
  #view-home:not([hidden]){animation:screen-from-left .18s ease-out}
}
@keyframes screen-from-right{from{opacity:0;transform:translateX(24px)}to{opacity:1;transform:none}}
@keyframes screen-from-left{from{opacity:0;transform:translateX(-24px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.memory-context{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin:0 0 10px}
.memory-context a{min-height:44px;display:inline-flex;align-items:center}
