@charset "utf-8";

/* ===========================================================================
   myKitchen — sign-in, linked accounts, and household management.
   Uses the tokens from site.css; adds only what this section needs.
   =========================================================================== */

.mk-page { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }

/* ---------- notices ------------------------------------------------------ */

.mk-banner {
  max-width: var(--measure);
  margin-bottom: 2.5rem; padding: 1.1rem 1.3rem;
  background: var(--soon-soft);
  border: 1px solid color-mix(in srgb, var(--soon) 38%, transparent);
  border-radius: var(--radius);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem;
}
.mk-banner-title {
  font-family: var(--display); font-weight: 800; font-size: 1rem;
  display: flex; align-items: center; gap: .55rem;
}
.mk-banner p:not(.mk-banner-title) { font-size: .93rem; color: var(--text-2); }

/* The same shape as the banner, in the urgent ramp: a server that cannot be
   reached, and the <noscript> line. Nothing on this page is decorative red. */
.mk-banner--bad {
  background: var(--urgent-soft);
  border-color: color-mix(in srgb, var(--urgent) 38%, transparent);
}

/* ---------- boot ---------------------------------------------------------- */

.mk-checking {
  display: flex; align-items: center; gap: .8rem;
  padding-block: clamp(2rem, 6vw, 4rem);
  color: var(--text-2);
}
.mk-spinner {
  flex: none; width: 1.15rem; height: 1.15rem; border-radius: 999px;
  border: 2px solid var(--border-strong); border-top-color: var(--brand);
  animation: mk-spin .8s linear infinite;
}
@keyframes mk-spin { to { transform: rotate(360deg); } }

/* The only animation on the page, so this is the only thing to turn off. */
@media (prefers-reduced-motion: reduce) {
  .mk-spinner {
    animation: none; border: 0; background: var(--brand);
    width: .65rem; height: .65rem;
  }
}

/* ---------- failures ------------------------------------------------------ */

/* Every alert region ships in the DOM, empty: role="alert" announces a text
   change inside a live element, and creating the element at failure time is the
   classic way to get silence. Empty must therefore cost nothing on screen. */
.mk-alert:empty { display: none; }
.mk-alert {
  padding: .75rem .95rem; border-radius: var(--radius);
  font-size: .92rem; overflow-wrap: anywhere;
}
.mk-alert--error {
  background: var(--urgent-soft);
  border: 1px solid color-mix(in srgb, var(--urgent) 34%, transparent);
  color: var(--text);
}

/* A panel waiting on an answer. Its buttons are disabled at the same moment, so
   this only has to say that the rows below are not current yet. */
.mk-panel[aria-busy="true"] { opacity: .6; }

/* ---------- forms and stages ---------------------------------------------- */

/* Where a provider's own UI, or a form, replaces the row of choices. */
.mk-stage {
  margin-top: .9rem; padding: 1.1rem 1.2rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface-sunken);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem;
}
.mk-stage-title { font-size: 1.05rem; }
.mk-stage-title:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 3px; }
.mk-stage-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }

/* Google renders its button into a cross-origin iframe of a fixed size that
   cannot be restyled, so the slot is sized to fit it rather than the reverse. */
.mk-gsi { max-width: 320px; min-height: 44px; }

.mk-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
.mk-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; }
.mk-field > span { font-size: .87rem; font-weight: 650; color: var(--text-2); }
.mk-field input {
  width: 100%; padding: .6rem .75rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--canvas); color: var(--text); font: inherit;
}
.mk-field input:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 1px; }
.mk-field input[aria-invalid="true"] { border-color: var(--urgent); }
.mk-field-hint { color: var(--text-3); font-size: .84rem; }

/* Six characters from a fixed alphabet, so it is spelled out like one. */
.mk-code-input {
  font-family: var(--mono); text-transform: uppercase;
  letter-spacing: .3em; width: 9ch;
}

/* A segmented pair, pressed rather than checked: aria-pressed is what carries
   the state, and the styling only agrees with it. */
.mk-modes { display: flex; gap: .4rem; flex-wrap: wrap; }
.mk-modes .btn-sm[aria-pressed="true"] {
  background: var(--brand); border-color: transparent; color: var(--on-brand);
}

.mk-form-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.mk-follow:empty { display: none; }

.mk-nofam { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; margin-top: 1rem; }
.mk-nofam-stage:empty { display: none; }

/* The panel-level failure row has no icon and no actions column of its own. */
.mk-row--wide { grid-template-columns: minmax(0, 1fr) auto; }

/* ---------- signed-out: the sign-in card -------------------------------- */

.mk-signin {
  max-width: 26rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-md);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem;
}
.mk-signin h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.mk-signin > p { color: var(--text-2); font-size: .93rem; margin-bottom: .6rem; }

.provider {
  display: flex; align-items: center; gap: .8rem; width: 100%;
  padding: .8rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--canvas);
  color: var(--text);
  font: inherit; font-weight: 650; font-size: .97rem;
  cursor: pointer; text-align: start;
}
.provider:hover { border-color: var(--text-3); background: var(--surface-sunken); }
.provider .mark { flex: none; width: 22px; height: 22px; display: grid; place-items: center; }
.provider .mark svg { width: 22px; height: 22px; display: block; }

.mk-or {
  display: flex; align-items: center; gap: .8rem;
  color: var(--text-3); font-size: .8rem; margin-block: .2rem;
}
.mk-or::before, .mk-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- signed-in: kitchen header ----------------------------------- */

.mk-hero {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem;
  padding-bottom: 2rem; margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 48rem) {
  .mk-hero { grid-template-columns: minmax(0,1fr) auto; align-items: end; }
}

.mk-name-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.mk-name {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(1.9rem, 1.4rem + 2.1vw, 3rem);
  letter-spacing: -.03em; line-height: 1.05;
  border: 0; background: none; color: var(--text);
  padding: 0; min-width: 6ch; max-width: 100%;
}
.mk-name:focus { outline: 2px solid var(--brand-bright); outline-offset: 4px; border-radius: .4rem; }

.mk-sub { color: var(--text-2); margin-top: .5rem; }

.mk-invite {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .6rem .75rem .6rem 1rem;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface);
}
.mk-invite-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.mk-invite-code {
  font-family: var(--mono); font-weight: 700; font-size: 1.05rem;
  letter-spacing: .16em; color: var(--text);
}

/* ---------- panels ------------------------------------------------------ */

.mk-panel { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.mk-panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem;
}
.mk-panel h2 { font-size: 1.3rem; }
.mk-panel-head p { color: var(--text-2); font-size: .93rem; max-width: 46ch; }

.mk-list { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: minmax(0, 1fr); gap: .7rem; }

.mk-row {
  display: grid; gap: .9rem 1rem; align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mk-row-main { min-width: 0; }
.mk-row-title { font-weight: 700; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mk-row-sub { color: var(--text-3); font-size: .87rem; margin-top: .1rem; overflow-wrap: anywhere; }
.mk-row-actions { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 34rem) {
  .mk-row { grid-template-columns: auto minmax(0, 1fr); }
  .mk-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

.mk-mark {
  width: 2.5rem; height: 2.5rem; flex: none;
  display: grid; place-items: center;
  border-radius: .7rem;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
}
.mk-mark svg { width: 22px; height: 22px; }

.avatar {
  width: 2.6rem; height: 2.6rem; flex: none;
  display: grid; place-items: center; border-radius: 999px;
  font-family: var(--display); font-weight: 800; font-size: 1rem;
  color: #1A0E06;
}

/* The five member colours the app assigns in order. They are classes rather
   than an inline style because the index arrives from the server, and a class
   name built from a whitelist can never reach a style context. */
.avatar--0 { background: #FF8A3D; }
.avatar--1 { background: #2BB673; }
.avatar--2 { background: #3D8FD9; }
.avatar--3 { background: #8B5FBF; }
.avatar--4 { background: #F5C542; }

/* ---------- small controls ---------------------------------------------- */

.btn-sm {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .42rem .8rem; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--canvas);
  color: var(--text); font: inherit; font-size: .87rem; font-weight: 650;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-sm:hover { border-color: var(--text-3); background: var(--surface-sunken); }
.btn-sm--primary { background: var(--brand); border-color: transparent; color: var(--on-brand); }
.btn-sm--primary:hover { background: var(--brand-bright); }
.btn-sm--danger { color: var(--urgent); border-color: color-mix(in srgb, var(--urgent) 40%, transparent); }
.btn-sm--danger:hover { background: var(--urgent-soft); border-color: var(--urgent); }
.btn-sm[disabled] { opacity: .45; cursor: not-allowed; }

.tag {
  display: inline-flex; align-items: center;
  padding: .1rem .45rem; border-radius: .35rem;
  font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.tag--linked { background: var(--fresh-soft); color: var(--fresh); }
.tag--owner  { background: var(--brand-soft); color: var(--brand); }
.tag--you    { background: var(--surface-sunken); color: var(--text-2); border: 1px solid var(--border); }

.mk-empty {
  padding: 1.1rem 1.25rem; border: 1px dashed var(--border-strong);
  border-radius: var(--radius); color: var(--text-2); font-size: .93rem;
}

.mk-note { color: var(--text-3); font-size: .86rem; margin-top: .9rem; }

.mk-danger {
  margin-top: 1rem; padding: 1.15rem 1.3rem;
  border: 1px solid color-mix(in srgb, var(--urgent) 30%, transparent);
  border-radius: var(--radius); background: var(--urgent-soft);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem;
}
.mk-danger h3 { font-size: 1rem; }
.mk-danger p { color: var(--text-2); font-size: .91rem; }
.mk-danger .mk-row-actions { justify-content: flex-start; margin-top: .3rem; }

/* ---------- store badges (used on the overview page) --------------------- */

.stores { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }

.store {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .6rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text); text-decoration: none;
}
.store:hover { border-color: var(--text-3); }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: grid; grid-template-columns: minmax(0, 1fr); line-height: 1.15; }
.store small { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.store b { font-family: var(--display); font-weight: 800; font-size: 1rem; letter-spacing: -.01em; }

.store--soon { background: transparent; border-style: dashed; }
.store--soon b, .store--soon svg { color: var(--text-2); }

/* The section is spelled myKitchen; the default eyebrow would flatten it to
   MYKITCHEN, so this one keeps its own casing. */
.eyebrow--wordmark { text-transform: none; letter-spacing: .01em; font-size: .82rem; }
