/* =============================================================================
   VeriSmart Tenant Feedback — portal styles

   Design: the property photo is the page header, with the address overlaid in
   the same field order reporting2 and the clerk calendar use. Content sits on a
   sheet that overlaps the photo. Mobile gets a bottom tab bar.

   Colour: sampled from verismart.co.uk and cross-checked against the tokens in
   verismart-reporting-pwa/src/index.css. Both brand hues are light, so white
   text on them fails WCAG AA (2.42:1 on the blue, 2.03:1 on the green).
   Text-bearing fills therefore use the darker shades below and the true brand
   hues are reserved for surfaces that carry no text.
   ============================================================================= */

:root {
  /* Brand */
  --vs-blue: #45b1e6;          /* brand blue — no text sits on this */
  --vs-blue-dark: #2f9ad0;     /* hover / borders */
  --vs-blue-darker: #1d7cad;   /* primary fill + link text — 4.63:1 on white */
  --vs-blue-deep: #17638a;     /* blue text on a blue tint — 5.93:1 */
  --vs-blue-tint: #e8f5fc;
  --vs-blue-tint-2: #d3ecf8;

  --vs-green: #97c451;         /* brand green — carries dark ink, 6.63:1 */
  --vs-green-dark: #7fae3c;    /* hover / borders */
  --vs-green-darker: #4f7320;  /* green text on a green tint — 5.03:1 */
  --vs-green-tint: #f0f7e6;

  /* Neutrals */
  --vs-ink: #2b2f33;           /* headings, and the label on a green fill */
  --vs-text: #58595b;          /* body — 7.01:1 on white */
  --vs-grey: #6b6e72;          /* muted text — 5.12:1 on white */
  --vs-grey-mid: #a7abaf;      /* decorative glyphs only, never text */
  --vs-border: #e2e6ea;
  --vs-border-soft: #eef1f4;
  --vs-surface: #ffffff;
  --vs-bg: #f6f8fa;

  /* Status */
  --vs-amber: #e2a03f;
  --vs-amber-tint: #fdf4e5;
  --vs-amber-text: #7a5a1e;
  --vs-danger: #c0392b;
  --vs-danger-tint: #fdeceb;
  --vs-danger-text: #8c2b21;

  --radius: 14px;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --sheet-radius: 24px;
  --tabbar-height: 62px;
  --max-content: 1080px;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08), 0 2px 4px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12), 0 4px 8px rgba(16, 24, 40, 0.04);
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--vs-text);
  background: #eef1f4;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  color: var(--vs-ink);
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 1.25rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
h4, h5 { font-size: 0.95rem; }

p { margin: 0; }

a { color: var(--vs-blue-darker); }

ul { margin: 0; padding: 0; list-style: none; }

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--vs-blue-darker);
  outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
   Brand mark
   The tick is the only VeriSmart asset confirmed to be public on ivcstatic, so
   the wordmark beside it is set in type rather than shipped as an image.
   -------------------------------------------------------------------------- */

.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  padding: 6px 11px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}

.brandmark img { height: 22px; width: auto; }

.brandmark__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--vs-blue-darker);
}

.brandmark__name em { font-style: normal; color: var(--vs-green-darker); }

/* On an already-white surface the pill is redundant. */
.brandmark--plain {
  background: none;
  box-shadow: none;
  padding: 0;
}

.brandmark--lg { padding: 8px 13px; }
.brandmark--lg img { height: 28px; }
.brandmark--lg .brandmark__name { font-size: 1.25rem; }

/* -----------------------------------------------------------------------------
   Address stack — mirrors the reporting2 / clerk-calendar field order:
   Flat {Flat_No} / {Prop_Name} / {House_No} {Address1} / {Address2} /
   {Town} / {County} / uppercase {Postcode}, with empty parts dropped.
   -------------------------------------------------------------------------- */

.vs-address {
  font-style: normal;
}

.vs-address span {
  display: block;
}

.vs-address .postcode {
  text-transform: uppercase;
}

/* -----------------------------------------------------------------------------
   Property photo header
   index.php sets background-image inline as
   url({Property_ID}.l.jpg), url({Property_ID}.w.png) so the flat colour below
   shows through when a property has no photo.
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  background-color: var(--vs-grey);
  background-position: center 42%;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 18, 24, 0.92) 0%,
    rgba(10, 18, 24, 0.70) 30%,
    rgba(10, 18, 24, 0.22) 58%,
    rgba(10, 18, 24, 0.30) 100%
  );
}

.hero__bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
}

.hero__spacer { flex: 1; }

.hero__icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.hero__icon:hover,
.hero__icon:focus-visible {
  background: rgba(255, 255, 255, 0.32);
}

.hero__icon svg { width: 17px; height: 17px; }

.hero__body {
  position: relative;
  z-index: 3;
  margin-top: auto;
  padding: 0 18px 30px;
  width: 100%;
}

.hero__ref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.30);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 11px;
}

.hero__ref svg { width: 12px; height: 12px; }

.hero .vs-address {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.36;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero .vs-address .lead {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 7px;
}

.tag svg { width: 13px; height: 13px; opacity: 0.9; flex-shrink: 0; }

/* -----------------------------------------------------------------------------
   Top bar (inner pages)
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--vs-surface);
  border-bottom: 1px solid var(--vs-border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
}

.topbar__title {
  font-size: 1.03rem;
  flex: 1;
  min-width: 0;
  font-weight: 700;
}

.topbar__ico {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--vs-border);
  background: var(--vs-surface);
  color: var(--vs-ink);
  text-decoration: none;
  flex-shrink: 0;
}

.topbar__ico:hover,
.topbar__ico:focus-visible { background: var(--vs-border-soft); }

.topbar__ico svg { width: 17px; height: 17px; }

/* -----------------------------------------------------------------------------
   Sheet (dashboard) and page (inner)
   -------------------------------------------------------------------------- */

.sheet {
  position: relative;
  z-index: 4;
  margin-top: -22px;
  background: var(--vs-bg);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  padding: 22px 18px 24px;
}

.sheet__inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.page {
  background: var(--vs-bg);
  padding: 18px;
  max-width: 680px;
  margin: 0 auto;
  min-height: 50vh;
}

.page--wide { max-width: var(--max-content); }

.stack {
  /* minmax(0,1fr): grid items default to min-width:auto, which the nowrap
     observation labels would otherwise widen past the viewport. */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 15px;
}

.stack > * { min-width: 0; }

.blocklabel {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--vs-grey);
  margin: 0 0 10px 3px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vs-blue-deep);
  background: var(--vs-blue-tint);
  border: 1px solid var(--vs-blue-tint-2);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 9px;
}

.card {
  background: var(--vs-surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

/* -----------------------------------------------------------------------------
   Countdown
   -------------------------------------------------------------------------- */

.count {
  background: var(--vs-surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 17px;
}

/* A solid ring, not a progress arc: the feedback period's start date is not
   stored (initial_notification_sent is a boolean flag), so there is no honest
   elapsed fraction to draw. Colour carries the urgency instead. */
.ring {
  position: relative;
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--vs-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring--urgent { background: var(--vs-amber); }
.ring--closed { background: var(--vs-grey-mid); }

.ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--vs-surface);
  border-radius: 50%;
}

.ring__val {
  position: relative;
  text-align: center;
  line-height: 1;
}

.ring__val b {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--vs-ink);
}

.ring__val small {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--vs-grey);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* The finalised state shows a tick in place of a day count. */
.ring__val svg {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  color: var(--vs-grey);
  stroke-width: 2.5;
}

.count__text h2 { font-size: 1rem; }
.count__text p { font-size: 0.82rem; margin-top: 5px; }

/* -----------------------------------------------------------------------------
   Action tiles
   -------------------------------------------------------------------------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tile {
  background: var(--vs-surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  min-height: 122px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tile:hover,
.tile:focus-visible { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.tile__ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vs-blue-tint);
  color: var(--vs-blue-deep);
  flex-shrink: 0;
}

.tile__ico svg { width: 20px; height: 20px; }
.tile__ico--green { background: var(--vs-green-tint); color: var(--vs-green-darker); }
.tile__ico--grey { background: var(--vs-border-soft); color: var(--vs-grey); }

.tile h3 { font-size: 0.9rem; margin-top: auto; }
.tile p { font-size: 0.75rem; color: var(--vs-grey); margin-top: 2px; }

.tile--primary {
  background: linear-gradient(135deg, var(--vs-blue-darker) 0%, var(--vs-blue-deep) 100%);
  box-shadow: 0 8px 22px rgba(29, 124, 173, 0.30);
}

.tile--primary h3 { color: #fff; }
.tile--primary p { color: rgba(255, 255, 255, 0.86); }
.tile--primary .tile__ico { background: rgba(255, 255, 255, 0.22); color: #fff; }

.tile__pill {
  position: absolute;
  top: 13px;
  right: 13px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.tile__badge {
  position: absolute;
  top: 13px;
  right: 13px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--vs-green);
  color: var(--vs-ink);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -----------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.bigbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--vs-green-dark);
  background: var(--vs-green);
  color: var(--vs-ink);
  font-size: 0.97rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 6px 18px rgba(151, 196, 81, 0.30);
}

.bigbtn:hover,
.bigbtn:focus-visible { background: var(--vs-green-dark); }

.bigbtn svg { width: 19px; height: 19px; flex-shrink: 0; }

.bigbtn--blue {
  background: var(--vs-blue-darker);
  border-color: var(--vs-blue-darker);
  color: #fff;
  box-shadow: 0 6px 18px rgba(29, 124, 173, 0.26);
}

.bigbtn--blue:hover,
.bigbtn--blue:focus-visible { background: var(--vs-blue-deep); }

.bigbtn--ghost {
  background: var(--vs-surface);
  color: var(--vs-ink);
  border-color: var(--vs-border);
  box-shadow: none;
}

.bigbtn--ghost:hover,
.bigbtn--ghost:focus-visible { background: var(--vs-border-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--vs-blue-darker);
  background: var(--vs-blue-darker);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible { background: var(--vs-blue-deep); }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn--ghost {
  background: var(--vs-surface);
  color: var(--vs-ink);
  border-color: var(--vs-border);
}

.btn--ghost:hover,
.btn--ghost:focus-visible { background: var(--vs-border-soft); }

.btn--confirm {
  background: var(--vs-green);
  border-color: var(--vs-green-dark);
  color: var(--vs-ink);
}

.btn--confirm:hover,
.btn--confirm:focus-visible { background: var(--vs-green-dark); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* -----------------------------------------------------------------------------
   Observations
   -------------------------------------------------------------------------- */

.obsstrip {
  background: var(--vs-surface);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.obsstrip__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.obsstrip__head h3 { font-size: 0.94rem; }

.obsstrip__head a {
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.obsscroll {
  display: flex;
  gap: 10px;
  margin-top: 13px;
  min-width: 0;
}

.obscard {
  flex: 1;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--vs-border-soft);
  background: #fafbfc;
  text-decoration: none;
}

.obscard img { width: 100%; height: 62px; object-fit: cover; }

.obscard__ph {
  width: 100%;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vs-border-soft);
  color: var(--vs-grey-mid);
}

.obscard__ph svg { width: 19px; height: 19px; }

.obscard span {
  display: block;
  padding: 7px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--vs-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obscard span small {
  display: block;
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--vs-grey);
  margin-top: 1px;
}

.obsitem {
  display: flex;
  gap: 13px;
  padding: 14px;
  background: var(--vs-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  align-items: center;
}

.obsitem:hover,
.obsitem:focus-visible { box-shadow: var(--shadow-md); }

.obsitem img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--vs-border-soft);
}

.obsitem .ph {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--vs-border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vs-grey-mid);
  flex-shrink: 0;
}

.obsitem .ph svg { width: 19px; height: 19px; }
.obsitem .b { display: block; flex: 1; min-width: 0; }
.obsitem .t { display: block; font-size: 0.9rem; font-weight: 700; color: var(--vs-ink); }
.obsitem .d { display: block; font-size: 0.79rem; color: var(--vs-text); margin-top: 2px; }
.obsitem .m { display: block; font-size: 0.72rem; color: var(--vs-grey); margin-top: 3px; }
.obsitem .chev { width: 17px; height: 17px; color: var(--vs-grey-mid); flex-shrink: 0; }

/* -----------------------------------------------------------------------------
   Confirm block, notes, link lists
   -------------------------------------------------------------------------- */

.confirm {
  background: var(--vs-surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e3efd2;
}

.confirm h2 { font-size: 1rem; }
.confirm p { font-size: 0.82rem; margin-top: 5px; }
.confirm .bigbtn { margin-top: 14px; }

.note {
  background: var(--vs-surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 4px solid var(--vs-amber);
  box-shadow: var(--shadow-xs);
  font-size: 0.82rem;
}

.note strong { color: var(--vs-ink); }

.note--flat {
  background: var(--vs-amber-tint);
  border: 1px solid #f3e2c4;
  border-left: 4px solid var(--vs-amber);
  color: var(--vs-amber-text);
  box-shadow: none;
}

.note--flat strong { color: #664a13; }

.note--error {
  background: var(--vs-danger-tint);
  border: 1px solid #f7d5d2;
  border-left: 4px solid var(--vs-danger);
  color: var(--vs-danger-text);
  box-shadow: none;
}

.note--error strong { color: #6f2119; }

/* Disclosure — keeps the full feedback-period explanation on the dashboard
   without letting it dominate the page. */
.disclose {
  background: var(--vs-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.disclose > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--vs-ink);
  cursor: pointer;
  list-style: none;
}

.disclose > summary::-webkit-details-marker { display: none; }

.disclose > summary::after {
  content: "";
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--vs-grey-mid);
  border-bottom: 2px solid var(--vs-grey-mid);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.disclose[open] > summary::after { transform: rotate(-135deg); }

.disclose > summary svg { width: 17px; height: 17px; color: var(--vs-grey); flex-shrink: 0; }

.disclose__body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--vs-border-soft);
  padding-top: 14px;
}

.links {
  background: var(--vs-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--vs-ink);
  border-top: 1px solid var(--vs-border-soft);
}

.links a:first-child { border-top: 0; }
.links a:hover,
.links a:focus-visible { background: var(--vs-border-soft); }

.links .li {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vs-border-soft);
  color: var(--vs-grey);
  flex-shrink: 0;
}

.links .li svg { width: 16px; height: 16px; }
.links .lt { flex: 1; min-width: 0; font-size: 0.9rem; font-weight: 600; }
.links .ls { display: block; font-size: 0.75rem; font-weight: 400; color: var(--vs-grey); margin-top: 1px; }
.links .lc { width: 16px; height: 16px; color: var(--vs-grey-mid); flex-shrink: 0; }

/* -----------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field { margin-bottom: 16px; }

.field label,
.field legend {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--vs-ink);
  margin-bottom: 5px;
  padding: 0;
}

.field .help {
  font-size: 0.79rem;
  color: var(--vs-grey);
  margin-bottom: 7px;
  font-weight: 400;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="number"],
.field textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--vs-ink);
  background: var(--vs-surface);
  border: 1px solid var(--vs-border);
  border-radius: 12px;
}

.field input[type="file"] {
  width: 100%;
  padding: 11px;
  font: inherit;
  font-size: 0.88rem;
  background: var(--vs-surface);
  border: 1px solid var(--vs-border);
  border-radius: 12px;
}

.field textarea { min-height: 116px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: var(--vs-grey-mid); }

.field input[readonly],
.field textarea[readonly] { background: var(--vs-border-soft); color: var(--vs-text); }

.field--otp input[type="text"] {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  padding: 14px;
}

.upload {
  border: 1.5px dashed #cbd3da;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  background: var(--vs-surface);
}

.upload__ico { width: 28px; height: 28px; color: var(--vs-blue-darker); margin: 0 auto 9px; }
.upload p { font-size: 0.88rem; font-weight: 700; color: var(--vs-ink); }
.upload small { display: block; font-size: 0.75rem; color: var(--vs-grey); margin-top: 4px; }
.upload input[type="file"] { margin-top: 11px; }

.checkbig {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: var(--vs-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  border: 1.5px solid var(--vs-green);
}

.checkbig input[type="checkbox"] {
  width: 21px;
  height: 21px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--vs-green-darker);
}

.checkbig label { font-size: 0.88rem; font-weight: 600; color: var(--vs-ink); }

.checkdelete {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid #f0d6d3;
  border-radius: var(--radius);
  background: var(--vs-danger-tint);
}

.checkdelete input[type="checkbox"] {
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--vs-danger);
}

.checkdelete label { font-size: 0.85rem; font-weight: 600; color: var(--vs-danger-text); }

.photo-preview img {
  max-width: 220px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--vs-border);
}

.steps { display: grid; gap: 12px; }

.steps li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 0.85rem;
}

.steps .n {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vs-green-tint);
  color: var(--vs-green-darker);
}

.steps .n svg { width: 14px; height: 14px; }
.steps .n--warn { background: var(--vs-amber-tint); color: #a5762a; }

/* -----------------------------------------------------------------------------
   Sign in
   -------------------------------------------------------------------------- */

.authwrap {
  display: flex;
  flex-direction: column;
}

.authhero {
  position: relative;
  flex: 0 0 auto;
  min-height: 232px;
  background-color: var(--vs-grey);
  background-image: linear-gradient(150deg, #2b3a44 0%, #1d7cad 58%, #45b1e6 100%);
  background-size: cover;
  background-position: center 45%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.authhero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 18, 24, 0.90) 0%,
    rgba(10, 18, 24, 0.50) 45%,
    rgba(10, 18, 24, 0.24) 100%
  );
}

.authhero__in {
  position: relative;
  z-index: 2;
  padding: 22px 22px 34px;
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
}

.authhero__in h1 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.24;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

.authhero__in p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  margin-top: 8px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.authsheet {
  position: relative;
  z-index: 3;
  margin-top: -22px;
  flex: 1;
  background: var(--vs-bg);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  padding: 24px 18px 26px;
}

.authsheet__in { max-width: 440px; margin: 0 auto; }

.codecard {
  background: var(--vs-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-top: 15px;
}

.codecard__t {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 13px 15px;
  font-size: 0.79rem;
  color: var(--vs-text);
  border-bottom: 1px solid var(--vs-border-soft);
}

.codecard__t svg { width: 15px; height: 15px; color: var(--vs-blue-darker); flex-shrink: 0; }

.codecard__img { display: block; padding: 14px; }
.codecard__img img { border-radius: 7px; border: 1px solid var(--vs-border); margin: 0 auto; }

.tiny { font-size: 0.79rem; color: var(--vs-grey); margin-top: 12px; }

/* -----------------------------------------------------------------------------
   Footer (holds the dyslexia toggle, so it appears on every screen)
   -------------------------------------------------------------------------- */

.appfoot {
  background: var(--vs-bg);
  padding: 4px 18px 22px;
}

.appfoot__in { max-width: var(--max-content); margin: 0 auto; }

.dys {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--vs-surface);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-xs);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--vs-text);
  cursor: pointer;
  user-select: none;
}

.dys__ico { width: 17px; height: 17px; color: var(--vs-blue-darker); flex-shrink: 0; }
.dys__label { flex: 1; min-width: 0; }

/* Native checkbox, visually presented as a switch. */
.dys__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.dys__track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d3d8dd;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.dys__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease;
}

.dys__input:checked + .dys__track { background: var(--vs-green-dark); }
.dys__input:checked + .dys__track::after { transform: translateX(18px); }
.dys__input:focus-visible + .dys__track { outline: 3px solid var(--vs-blue-darker); outline-offset: 2px; }

.appfoot__c {
  text-align: center;
  font-size: 0.75rem;
  color: var(--vs-grey);
  margin-top: 14px;
}

/* -----------------------------------------------------------------------------
   Bottom tab bar (mobile)
   -------------------------------------------------------------------------- */

.tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--vs-border);
  padding: 7px 4px calc(10px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 14px rgba(16, 24, 40, 0.06);
}

.tabs a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--vs-grey);
  font-size: 0.66rem;
  font-weight: 600;
  position: relative;
  padding: 2px 0;
}

.tabs a svg { width: 21px; height: 21px; }
.tabs a.on { color: var(--vs-blue-darker); }

.tabs .dot {
  position: absolute;
  top: 0;
  right: 50%;
  margin-right: -17px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--vs-green);
  color: var(--vs-ink);
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Keep the tab bar clear of page content. */
body.has-tabbar .appfoot { padding-bottom: calc(var(--tabbar-height) + 22px); }

/* -----------------------------------------------------------------------------
   Loading overlay
   -------------------------------------------------------------------------- */

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.loading-overlay[hidden] { display: none; }

.loading-overlay__panel {
  background: var(--vs-surface);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.loading-overlay__panel p { margin: 0.75rem 0 0; font-weight: 600; }

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 3px solid var(--vs-border);
  border-top-color: var(--vs-blue-darker);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* -----------------------------------------------------------------------------
   Embedded content (GDPR, instructions)
   -------------------------------------------------------------------------- */

.content-embed {
  background: var(--vs-surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.content-embed h1,
.content-embed h2,
.content-embed h3 { margin-top: 1.25rem; }

.content-embed h1:first-child,
.content-embed h2:first-child,
.content-embed h3:first-child { margin-top: 0; }

.content-embed p,
.content-embed ul,
.content-embed ol { margin: 0 0 1rem; }

.content-embed ul,
.content-embed ol { padding-left: 1.25rem; list-style: disc; }

.content-embed li { margin-bottom: 0.35rem; }

.prose p { margin-bottom: 0.85rem; font-size: 0.9rem; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { font-size: 1rem; margin-bottom: 0.6rem; }

/* -----------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--vs-grey); font-size: 0.79rem; }

/* -----------------------------------------------------------------------------
   Desktop
   -------------------------------------------------------------------------- */

@media (min-width: 900px) {
  .hero { min-height: 400px; background-position: center 45%; }
  .hero__bar { padding: 20px 34px; }
  .brandmark img { height: 26px; }
  .brandmark__name { font-size: 1.125rem; }
  .hero__body { padding: 0 34px 44px; max-width: var(--max-content); margin-left: auto; margin-right: auto; }
  .hero .vs-address { font-size: 1.2rem; }
  .hero .vs-address .lead { font-size: 2rem; }

  .sheet {
    padding: 28px 34px 30px;
    border-radius: 30px 30px 0 0;
    margin-top: -26px;
  }

  .page { padding: 28px 34px; }

  .dcols {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .topbar { padding: 14px 34px; }
  .appfoot { padding: 6px 34px 26px; }

  /* Desktop has room for the header links, so the tab bar is redundant. */
  .tabs { display: none; }
  body.has-tabbar .appfoot { padding-bottom: 26px; }

  .authhero { min-height: 300px; }
  .authhero__in { padding: 30px 34px 46px; }
  .authhero__in h1 { font-size: 2rem; }
  .authsheet { padding: 30px 34px 30px; }
}

/* -----------------------------------------------------------------------------
   Dyslexia Friendly Mode
   British Dyslexia Association guidance: clear sans-serif, slightly larger
   text, extra letter and word spacing, 1.5 line height, softer contrast.
   -------------------------------------------------------------------------- */

html.dyslexia-friendly {
  --font-sans: Arial, Verdana, Calibri, Tahoma, "Trebuchet MS", sans-serif;
  --vs-ink: #2a2a2a;
  --vs-text: #333333;
  --vs-grey: #4a4a4a;
  --vs-surface: #faf8f3;
  --vs-bg: #f3f1ea;
  --vs-border: #d9d4c8;
  --vs-border-soft: #e8e4d9;
}

html.dyslexia-friendly body {
  font-size: 1.0625rem;
  letter-spacing: 0.05em;
  word-spacing: 0.12em;
  line-height: 1.5;
  background: #e9e6dc;
}

html.dyslexia-friendly button,
html.dyslexia-friendly input,
html.dyslexia-friendly select,
html.dyslexia-friendly textarea {
  font-family: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
}

html.dyslexia-friendly .tabs { background: #faf8f3; }

/* The PDF cannot reflow, so steer dyslexic readers to the web report. */
.dyslexia-report-guide {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--vs-surface);
  border-left: 4px solid var(--vs-blue-darker);
  box-shadow: var(--shadow-xs);
  font-size: 0.85rem;
}

html.dyslexia-friendly .dyslexia-report-guide { display: block; }

.dyslexia-report-guide p { margin: 0; }

.report-recommend-badge {
  display: none;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--vs-green-tint);
  border: 1px solid #d7e8bd;
  color: var(--vs-green-darker);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

html.dyslexia-friendly .report-recommend-badge { display: inline-block; }

/* In dyslexia mode, promote the web report tile and mute the PDF one. */
html.dyslexia-friendly .html-report-item {
  box-shadow: 0 0 0 2px var(--vs-blue-darker), var(--shadow-sm);
}

html.dyslexia-friendly .pdf-report-item { opacity: 0.78; }

/* -----------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -----------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .tabs, .hero__bar, .dys, .loading-overlay { display: none !important; }
  body { background: #fff; }
  .sheet, .page, .appfoot { background: #fff; }
}
