/* Brook-Dale Farmstead
   ---------------------------------------------------------------------------
   Every colour has a job written next to it. A colour with no job is cut.
   The palette is taken from the ground the farm stands on: Shahapur taluka is
   laterite earth, monsoon paddy and the reservoirs that feed Mumbai — a brook
   and a dale, which is what the farm is called. The two egg swatches are the
   real shell colours, so the products are told apart by the thing itself.
   --------------------------------------------------------------------------- */

:root {
  --paper:      #efeae0;   /* page ground — ledger paper, greyed so it is not "warm cream" */
  --paper-deep: #e4ddcf;   /* second surface: the board, table stripes */
  --ink:        #241a14;   /* body text — near-black carrying brown */
  --ink-soft:   #6a5a4e;   /* secondary text, labels, captions */
  --rule:       #cabfad;   /* hairlines and table rules */
  --water:      #2e5a63;   /* THE accent: reservoir teal. Rules, marks, links,
                              headings, states, the login. Systemic, not a button colour */
  --water-deep: #1d3d44;   /* pressed and hover states of the above */
  --paddy:      #4a6b32;   /* one job: in stock / entered / good */
  --kum:        #a33a2a;   /* one job: out of stock / dead / does not tie */
  --earth:      #6b3a2a;   /* the mark and the section numerals */
  --shell-desi: #c98b5e;   /* desi egg — brown shell */
  --shell-eng:  #f4efe6;   /* english egg — white shell */

  --measure: 34rem;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --deva: "Tiro Devanagari Marathi", "Nirmala UI", "Noto Sans Devanagari", serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
}

/* Paper tooth. Texture, never a gradient — a gradient hero is the machine's
   signature and this page will not carry one. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .30;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'>\
<filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/>\
<feColorMatrix type='saturate' values='0'/></filter>\
<rect width='140' height='140' filter='url(%23g)' opacity='.45'/></svg>");
  mix-blend-mode: multiply;
}

.mr { font-family: var(--deva); font-weight: 400; }

a { color: var(--water); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--water-deep); }

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }
.rule-full { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.rule-double { border: 0; border-top: 3px double var(--water); margin: 0; }

/* ---------------------------------------------------------------- masthead */
.masthead { padding: 1rem 0 .85rem; }
.masthead-in {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: baseline; justify-content: space-between;
}
.mark { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.mark svg { width: 40px; height: 40px; flex: none; }
.mark-name {
  font-family: var(--display);
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 40;
  font-weight: 600; font-size: 1.32rem; letter-spacing: -.012em; line-height: 1;
}
.mark-place {
  font-size: .72rem; letter-spacing: .10em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: .22rem;
}
.tel {
  font-family: var(--display); font-weight: 600; font-size: 1.15rem;
  color: var(--water); text-decoration: none; white-space: nowrap;
}
.tel span { display: block; font-family: var(--text); font-weight: 500;
  font-size: .68rem; letter-spacing: .10em; text-transform: uppercase;
  color: var(--ink-soft); }

/* ------------------------------------------------------------------- board */
/* The one loud thing on the page. A farm shop has a slate at the gate; this is
   that slate, and it is filled in by the team's own daily entry. */
.board { padding: 2.4rem 0 2.8rem; }
.board-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.1rem;
}
.board-title {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 144;
  font-weight: 600; font-size: clamp(2.3rem, 7vw, 3.6rem);
  line-height: .95; letter-spacing: -.022em; margin: 0;
}
.stamp {
  font-size: .76rem; letter-spacing: .04em; color: var(--ink-soft);
  text-align: right; line-height: 1.45;
}
.stamp b { color: var(--ink); font-weight: 600; }
.dot { display: inline-block; width: .5em; height: .5em; border-radius: 50%;
  background: var(--paddy); margin-right: .4em; vertical-align: .05em; }
.dot.cold { background: var(--rule); }

/* Deliberately uneven: the rate column is wider than the stock column.
   Equal boxes would say the two things matter equally. They do not. */
.rates { border-top: 3px double var(--water); }
.rate-row {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  grid-template-areas: "sw name fig" "meta meta meta";
  gap: .25rem 1rem; align-items: center;
  padding: .95rem 0; border-bottom: 1px solid var(--rule);
}
.rate-row > .swatch { grid-area: sw; align-self: center; }
.rate-row:empty { display: none; }
.rate-name { grid-area: name; }
.rate-fig  { grid-area: fig; }
.rate-meta { grid-area: meta; text-align: right; font-size: .76rem;
  color: var(--ink-soft); letter-spacing: .01em; }
.swatch { width: 1.6rem; height: 2rem; border-radius: 50% / 46% 46% 54% 54%;
  border: 1px solid rgba(36,26,20,.28); }
.swatch.desi { background: var(--shell-desi); }
.swatch.eng  { background: var(--shell-eng); }
.swatch.bird { border: 0; border-radius: 0; display: grid; place-items: center;
  color: var(--ink); }
.swatch.bird svg { width: 2rem; height: 2rem; }
.rate-name { font-family: var(--display); font-variation-settings: "SOFT" 20, "opsz" 40;
  font-weight: 600; font-size: 1.18rem; line-height: 1.15; }
.rate-name .mr { display: block; font-size: .9rem; color: var(--ink-soft); font-weight: 400; }
.rate-fig { text-align: right; white-space: nowrap; }
.rate-fig b {
  font-family: var(--display);
  font-variation-settings: "SOFT" 20, "opsz" 96;
  font-weight: 600; font-size: clamp(1.9rem, 5.4vw, 2.7rem);
  line-height: 1; letter-spacing: -.02em;
}
.in-stock { color: var(--paddy); font-weight: 600; }
.out-stock { color: var(--kum); font-weight: 600; }
.no-rate { color: var(--ink-soft); font-family: var(--text); font-size: 1rem;
  font-weight: 500; }

/* ------------------------------------------------------------------- order */
.order { padding: 2.4rem 0 3rem; }
.order-grid { display: grid; gap: 1.6rem 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) { .order-grid { grid-template-columns: 1.25fr .95fr; } }
.sec {
  font-family: var(--display); font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 72;
  font-weight: 600; font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.018em;
  margin: 0 0 .35rem;
}
.sec-note { color: var(--ink-soft); max-width: var(--measure); margin: 0 0 1.1rem; }
.qty-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto auto;
  gap: .8rem; align-items: center; padding: .7rem 0;
  border-bottom: 1px solid var(--rule);
}
.qty-row .unit { color: var(--ink-soft); font-size: .82rem; white-space: nowrap; }
input[type="number"], input[type="text"], input[type="tel"], input[type="password"], textarea {
  font: inherit; font-variant-numeric: tabular-nums;
  background: #fbf8f2; color: var(--ink);
  border: 1px solid var(--rule); border-radius: 2px;
  padding: .5rem .6rem; width: 100%; min-height: 2.6rem;
}
input:focus, textarea:focus { outline: 2px solid var(--water); outline-offset: 1px;
  border-color: var(--water); }
.qty-row input { width: 5.2rem; text-align: right; }
.total {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: 1rem 0; border-top: 3px double var(--water); margin-top: .4rem;
}
.total b { font-family: var(--display); font-variation-settings: "opsz" 96;
  font-weight: 600; font-size: 2.1rem; line-height: 1; }
.btn {
  display: inline-block; font: inherit; font-weight: 600; letter-spacing: .01em;
  background: var(--water); color: #fbf8f2; border: 1px solid var(--water);
  border-radius: 2px; padding: .78rem 1.4rem; cursor: pointer;
  text-decoration: none; min-height: 2.9rem;
}
.btn:hover { background: var(--water-deep); border-color: var(--water-deep); color: #fbf8f2; }
.btn.ghost { background: transparent; color: var(--water); }
.btn.ghost:hover { background: rgba(46,90,99,.08); color: var(--water-deep); }
.btn.wide { display: block; width: 100%; text-align: center; }
.field { margin-bottom: .9rem; }
.field label { display: block; font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: .3rem; }
.problems { border-left: 3px solid var(--kum); background: rgba(163,58,42,.06);
  padding: .7rem .9rem; margin: 0 0 1rem; }
.problems ul { margin: 0; padding-left: 1.1rem; }

/* -------------------------------------------------------------- story/find */
.story { padding: 2.6rem 0; border-top: 1px solid var(--rule); }
.story p { max-width: var(--measure); }
.story .lead { font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 48;
  font-size: 1.32rem; line-height: 1.4; }
.find { padding: 2.4rem 0 1rem; border-top: 1px solid var(--rule); }
.find-grid { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) { .find-grid { grid-template-columns: 1fr 1fr; } }
.kv { margin: 0; }
.kv dt { font-size: .74rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: .9rem; }
.kv dd { margin: .15rem 0 0; }
footer { padding: 2rem 0 3rem; border-top: 1px solid var(--rule); margin-top: 2rem;
  color: var(--ink-soft); font-size: .86rem; }
.foot-in { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; }

/* --------------------------------------------------------------- team app */
/* Thumb-first. The team fills this on a mid-range Android, standing up,
   at the end of a working day. Targets are large and the order is his order. */
.app { max-width: 34rem; }
.app-bar { display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.app-bar .who { font-size: .8rem; color: var(--ink-soft); }
.big-choice { display: block; border: 1px solid var(--rule); background: var(--paper-deep);
  border-radius: 3px; padding: 1.15rem 1.2rem; margin: .9rem 0; text-decoration: none;
  color: inherit; border-left: 4px solid var(--water); }
.big-choice:hover { background: #e9e2d3; color: inherit; }
.big-choice b { font-family: var(--display); font-variation-settings: "SOFT" 30, "opsz" 48;
  font-weight: 600; font-size: 1.35rem; display: block; }
.big-choice .mr { font-size: 1.05rem; color: var(--ink-soft); }
.big-choice .state { font-size: .8rem; margin-top: .35rem; }
.entry { padding: .85rem 0; border-bottom: 1px solid var(--rule);
  display: grid; grid-template-columns: minmax(0,1fr) 7rem; gap: .8rem; align-items: center; }
.entry label { font-weight: 500; line-height: 1.25; }
.entry label .mr { display: block; font-size: .95rem; color: var(--ink-soft); font-weight: 400; }
.entry input { text-align: right; }
.entry.opt { background: rgba(46,90,99,.045); margin: 0 -.6rem; padding: .85rem .6rem; }
.entry .new-tag { display: inline-block; font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--water); border: 1px solid var(--water);
  border-radius: 2px; padding: 0 .3em; margin-left: .4em; vertical-align: .12em; }
.entry .err { color: var(--kum); font-size: .8rem; display: block; }
.group-head { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--water); margin: 1.8rem 0 .2rem; padding-bottom: .3rem;
  border-bottom: 3px double var(--water); }
.saved-note { font-size: .8rem; color: var(--ink-soft); min-height: 1.2em; }

/* balances — the readout that makes this a book and not a diary */
.bal { border-top: 3px double var(--water); margin-top: 1.4rem; }
.bal-row { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.bal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.bal-name { font-family: var(--display); font-variation-settings: "SOFT" 20, "opsz" 48;
  font-weight: 600; font-size: 1.1rem; }
.bal-gap { font-family: var(--display); font-variation-settings: "opsz" 72;
  font-weight: 600; font-size: 1.6rem; line-height: 1; white-space: nowrap; }
.bal-gap.ok { color: var(--paddy); }
.bal-gap.off { color: var(--kum); }
.bal-line { font-size: .84rem; color: var(--ink-soft); margin-top: .3rem; }

table.book { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.book th, table.book td { text-align: right; padding: .42rem .5rem;
  border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.book th:first-child, table.book td:first-child { text-align: left; }
table.book thead th { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); border-bottom: 2px solid var(--water); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pill { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--rule); border-radius: 2px; padding: .1em .45em; }
.pill.new { border-color: var(--kum); color: var(--kum); }
.pill.paid { border-color: var(--paddy); color: var(--paddy); }

/* ------------------------------------------------------------------- pay */
.pay { max-width: 30rem; text-align: center; padding: 2.5rem 0 3rem; }
.pay .amount { font-family: var(--display); font-variation-settings: "opsz" 144;
  font-weight: 600; font-size: clamp(3rem, 14vw, 4.6rem); line-height: 1;
  letter-spacing: -.03em; margin: .3rem 0 .1rem; }
.qr { background: #fbf8f2; border: 1px solid var(--rule); padding: 1rem;
  display: inline-block; margin: 1.2rem 0 .6rem; }
.qr svg, .qr img { display: block; width: 15rem; height: 15rem; }
.notice { border-left: 3px solid var(--kum); background: rgba(163,58,42,.06);
  padding: .8rem 1rem; text-align: left; margin: 1.2rem 0; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background 140ms cubic-bezier(.2,.7,.3,1); }
}
