/* One small stylesheet for the whole site, served as /assets/site.<hash>.css. The owner's coming-soon preview (CKM-587,
   docs/planning/changes/CR-018/web): white ground, brand green, Plus Jakarta Sans, Noto Sans Devanagari for Hindi with a roomier line
   height. Text pairs are 4.5:1 or better; focus is always visible; targets are 44px or more; nothing scrolls sideways at 320px. */
:root {
  color-scheme: light;
  --ground: #fff;
  --ink: #141613;
  --muted: #4a5249;
  --quiet: #5c645b;
  --body: #2e342d;
  --brand: #1f6b4f;
  --brand-dark: #174f3b;
  --brand-soft: #e8f3ee;
  --tile: #f6f8f5;
  --line: #e3e8e1;
  --draft-bg: #fff4e5;
  --draft-ink: #7a4a00;
  --focus: #1f5fbf;
  --danger: #b42318;
  --danger-dark: #912018;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family:
    'Plus Jakarta Sans',
    'Noto Sans Devanagari',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  line-height: 1.5;
  overflow-wrap: break-word;
}

html[lang='hi'] body {
  font-family: 'Noto Sans Devanagari', 'Plus Jakarta Sans', system-ui, sans-serif;
  line-height: 1.75;
}

a {
  color: var(--brand);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--brand-dark);
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ground);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border: 2px solid var(--focus);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

main:focus {
  outline: none;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
}

/* header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.25rem;
}

.logo {
  display: block;
  flex: none;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.langs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
}

.langs a[aria-current] {
  background: var(--brand-soft);
  color: var(--brand);
}

/* home: hero */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 16px;
  padding-bottom: 72px;
}

.copy {
  flex: 999 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pill {
  margin: 0;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}

html[lang='hi'] h1 {
  letter-spacing: 0;
  line-height: 1.3;
}

/* every line sits in the same grid cell, so the box is always as tall as the longest line: no jump while flipping */
.flip {
  display: grid;
}

.flip span {
  grid-area: 1 / 1;
  transition:
    transform 0.45s ease,
    opacity 0.45s ease;
  transform-origin: 50% 60%;
}

.flip span[data-off] {
  opacity: 0;
  transform: rotateX(90deg);
}

.sub {
  margin: 0;
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 36rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-top: 8px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  line-height: 1.15;
}

a.store:hover {
  color: #fff;
}

.store small {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
}

.store b {
  display: block;
  font-size: 1.0625rem;
}

.muted {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* home: the phone drawing */
.phonebox {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.phone {
  width: 300px;
  max-width: 100%;
  aspect-ratio: 300 / 600;
  border-radius: 48px;
  background: var(--ink);
  padding: 12px;
  box-shadow: 0 30px 60px -20px rgb(20 22 19 / 35%);
}

.screen {
  width: 100%;
  height: 100%;
  border-radius: 38px;
  background: var(--tile);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}

.eyebrow {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card {
  width: 100%;
  border-radius: 22px;
  background: var(--ground);
  box-shadow: 0 6px 18px -8px rgb(20 22 19 / 18%);
  overflow: hidden;
  text-align: left;
}

.card .img {
  height: 120px;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card .txt {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card p {
  margin: 0;
}

.dish {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.25;
}

.by,
.small {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.btns {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btns span {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9375rem;
}

.b1 {
  background: var(--brand);
  color: #fff;
}

.b2 {
  background: var(--brand-soft);
  color: var(--brand);
}

/* home: cook together */
.what {
  padding-bottom: 72px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

h2.big {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

html[lang='hi'] h2.big {
  letter-spacing: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}

.cards div {
  padding: 24px;
  border-radius: 20px;
  background: var(--tile);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cards p {
  margin: 0;
}

.k {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.h {
  font-weight: 800;
  font-size: 1.125rem;
}

.d {
  color: var(--muted);
}

/* text pages: legal, support, open this recipe, 404 */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px 72px;
  line-height: 1.7;
  font-size: 1.0625rem;
}

.doc h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin: 8px 0 16px;
}

.doc h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 36px 0 8px;
  scroll-margin-top: 1rem;
}

.doc h3 {
  font-size: 1.125rem;
  margin: 24px 0 6px;
}

.doc p,
.doc li {
  color: var(--body);
}

.doc ul,
.doc ol {
  padding-left: 1.25rem;
}

.doc .note {
  font-size: 0.9375rem;
  color: var(--quiet);
}

.draft {
  display: inline-block;
  margin: 0 0 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--draft-bg);
  color: var(--draft-ink);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.4;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover {
  background: var(--brand-dark);
  color: #fff;
}

.open .eyebrow {
  margin-top: 24px;
}

/* the group invite page (CKM-367): the rounded-square initials avatar beside the name, as GroupInvite.dc.html's header */
.ghead {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.ghead h1 {
  margin: 0;
  overflow-wrap: anywhere;
}

.ghead .muted {
  margin: 4px 0 0;
}

.gav {
  display: grid;
  flex: none;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 1.5rem;
}

.invite [hidden] {
  display: none;
}

.invite .note a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.doc section + section {
  margin-top: 48px;
}

/* the takedown request form (CKM-614): full-width fields, 48px tall, 44px choice rows, a visible focus ring */
.takedown [hidden] {
  display: none;
}

.takedown form {
  margin-top: 16px;
}

.takedown .field {
  margin: 0 0 16px;
}

.takedown fieldset {
  border: 0;
  padding: 0;
}

.takedown label,
.takedown legend {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.takedown input[type='text'],
.takedown input[type='email'],
.takedown textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 10px 14px;
  border: 1px solid var(--muted);
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
  background: var(--ground);
}

.takedown .choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 400;
}

.takedown .choice input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--brand);
}

.takedown input:focus-visible,
.takedown textarea:focus-visible,
.takedown button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.takedown button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.takedown button[disabled] {
  opacity: 0.6;
}

.takedown .status:empty {
  display: none;
}

.takedown .status {
  font-weight: 600;
  color: var(--draft-ink);
}

/* the web account deletion (CKM-277): 480px at most, the signed-in card, the red button with its spinner while deleting */
.del {
  max-width: 480px;
}

.del [hidden] {
  display: none;
}

.del button {
  min-width: 44px;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.del button:focus-visible,
.del .status:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.del-card {
  margin: 16px 0;
  padding: 4px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.del-name {
  margin-bottom: 0;
  font-weight: 700;
  color: var(--ink);
}

.btn.danger {
  gap: 10px;
  background: var(--danger);
}

.btn.danger:hover {
  background: var(--danger-dark);
}

.btn.danger[disabled] {
  cursor: default;
  opacity: 0.8;
}

.btn.danger[aria-busy='true']::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  animation: del-spin 0.8s linear infinite;
}

@keyframes del-spin {
  to {
    transform: rotate(360deg);
  }
}

.del .status:empty {
  display: none;
}

.del .status {
  font-weight: 600;
  color: var(--ink);
}

.foot p a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* footer */
footer {
  border-top: 1px solid var(--line);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-block: 20px 36px;
  font-size: 0.9375rem;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.foot p {
  margin: 0;
  color: var(--quiet);
}

@media (min-width: 40rem) {
  .wrap {
    padding-inline: 24px;
  }

  .top {
    padding-block: 28px;
  }

  .doc {
    padding-inline: 24px;
  }
}

/* reduced motion: the slogan crossfades instead of flipping */
@media (prefers-reduced-motion: reduce) {
  .flip span {
    transition: opacity 0.6s ease;
  }

  .flip span[data-off] {
    transform: none;
  }
}

/* the shared-recipe page (CKM-278, LinkWeb.dc.html): sender, cover, chips, "You'll need", the community note, the steps, the card.
   Cover and avatar colours are the app's (apps/mobile src/ui/tokens/palette.ts COVER_PAIRS, AVATAR_COLORS / AVATAR_INKS, light). */
.acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.btn.sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.9375rem;
}

.share {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 16px 72px;
}

.share p {
  margin: 0;
}

.sender {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.av {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 700;
}

.av-0 {
  background: #fbe4ee;
  color: #7d0f3d;
}

.av-1 {
  background: #fbeedc;
  color: #7a3a06;
}

.av-2 {
  background: #f6e5de;
  color: #7a2e1a;
}

.av-3 {
  background: #e6ecf7;
  color: #1f3566;
}

.av-4 {
  background: #e8f2ec;
  color: #16503b;
}

.av-5 {
  background: #f0f0ec;
  color: #3c4043;
}

.bubble {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 4px 16px 16px;
  background: #f5f5f2;
}

.bubble .from {
  font-size: 0.75rem;
  font-weight: 700;
  color: #5f6368;
}

.bubble .msg {
  font-size: 0.9375rem;
  line-height: 1.4;
  white-space: pre-line;
}

.cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 190px;
  padding: 18px;
  border-radius: 18px;
  overflow: hidden;
}

.cover h1 {
  position: relative;
  max-width: 16em;
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.15;
  color: var(--cover-ink);
  overflow-wrap: anywhere;
}

.rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rings circle:first-child {
  fill: none;
  stroke: var(--cover-accent);
  stroke-opacity: 0.14;
  stroke-width: 2;
}

.rings circle:last-child {
  fill: var(--cover-accent);
  fill-opacity: 0.08;
}

.cv-saffron {
  --cover-ink: #7a3a06;
  --cover-accent: #b45309;
  background: #fbeedc;
}

.cv-mint {
  --cover-ink: #16503b;
  --cover-accent: #1f6b4f;
  background: #e8f2ec;
}

.cv-blue {
  --cover-ink: #1f3566;
  --cover-accent: #2e4a86;
  background: #e6ecf7;
}

.cv-terracotta {
  --cover-ink: #7a2e1a;
  --cover-accent: #a9442a;
  background: #f6e5de;
}

.cv-rose {
  --cover-ink: #7d0f3d;
  --cover-accent: #b5195b;
  background: #fbe4ee;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 2px 12px;
  border-radius: 15px;
  background: #f5f5f2;
  font-size: 0.8125rem;
  font-weight: 700;
}

.chips .amber {
  border: 1px solid #e9d3b4;
  background: #fffaf2;
  color: #7a3a06;
}

.share h2 {
  margin: 0 0 4px;
  font-size: 1.0625rem;
  font-weight: 800;
}

.need p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #3c4043;
}

.cnote {
  padding: 12px;
  border: 1px solid #e9d3b4;
  border-radius: 14px;
  background: #fffaf2;
  color: #7a3a06;
  font-size: 0.875rem;
}

.cnote .t {
  font-weight: 700;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps ol {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  line-height: 1.5;
}

.steps .n {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.875rem;
  font-weight: 800;
}

.steps .quiet {
  font-size: 0.875rem;
  color: var(--quiet);
}

/* a static Kitchen page (CKM-279): the steps are in the page and show at #steps, replacing the "Just show me the steps" link */
.steps.tg:not(:target) {
  display: none;
}

.share:has(.steps.tg:target) .get .more {
  display: none;
}

.fnote {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--quiet);
}

.get {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: #f5f5f2;
}

.get p {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
}

.get .btn {
  min-height: 52px;
  border-radius: 14px;
}

.get .more {
  display: inline-flex;
  align-self: center;
  align-items: center;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 700;
}

.get .btn.alt {
  border: 1px solid var(--line);
  background: var(--ground);
  color: var(--ink);
}

/* the profile page (CKM-482, Profile.dc.html): the cuisine cover, the overlapping avatar, name and badge, counts, place and quote,
   then up to 6 recipes as whole-row links */
.pcover {
  min-height: 132px;
}

.pav {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: -58px 0 0 16px;
  border: 4px solid var(--ground);
  border-radius: 50%;
  overflow: hidden;
  font-size: 2rem;
  font-weight: 800;
  position: relative;
}

.av-k {
  background: var(--brand);
}

.pname {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pname h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 100%;
  padding: 2px 10px;
  border: 1px solid #e9d3b4;
  border-radius: 13px;
  background: #fffaf2;
  color: #7a3a06;
  font-size: 0.8125rem;
  font-weight: 700;
}

.pstats {
  font-size: 0.9375rem;
  font-weight: 700;
}

.share .quiet {
  font-size: 0.875rem;
  color: var(--quiet);
}

.pquote {
  font-size: 0.9375rem;
  color: var(--muted);
}

.precipes ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.precipes a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
}

.precipes .t {
  font-weight: 700;
  overflow-wrap: anywhere;
}
