/* VL Iyer & Co. brand theme — matches vliyer.com.
   Loaded after style.css: re-maps the design tokens to the website palette
   (cream, logo maroon, banana-leaf green, turmeric) and adds the site's
   typography, thoranam garland, raised buttons and maroon footer.
   The website is light-only, so the planner uses the same palette in dark mode. */

:root,
:root:not(.x) {
  color-scheme: light;

  --vl-maroon: #7A0000;
  --vl-maroon-800: #5E0303;
  --vl-maroon-900: #3F0505;
  --vl-maroon-950: #2A0303;
  --vl-leaf: #2E7D32;
  --vl-leaf-700: #23692A;
  --vl-turmeric: #F2B01E;
  --vl-turmeric-700: #C98A06;
  --vl-marigold: #F57C00;
  --vl-cream: #FFF8E6;
  --vl-sky: #F8D9AB;
  --vl-ink: #3B1F12;
  --vl-ink-soft: #6A4A35;
  --vl-thoranam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='40' viewBox='0 0 88 40'%3E%3Cpath d='M0 4 Q44 12 88 4' stroke='%238a5a2b' stroke-width='1.6' fill='none'/%3E%3Cpath d='M22 7 C29 16 29 28 22 38 C15 28 15 16 22 7Z' fill='%232e7d32'/%3E%3Cpath d='M22 9 L22 35' stroke='%23164f1c' stroke-width='1'/%3E%3Cpath d='M66 7 L66 13' stroke='%238a5a2b' stroke-width='1.2'/%3E%3Ccircle cx='66' cy='19' r='7' fill='%23f57c00'/%3E%3Ccircle cx='66' cy='19' r='4.2' fill='%23f2b01e'/%3E%3Ccircle cx='66' cy='30' r='3.2' fill='%23c62828'/%3E%3C/svg%3E");

  --tint: var(--vl-maroon);
  --tint-pressed: var(--vl-maroon-800);
  --tint-soft: rgba(122, 0, 0, 0.09);
  --gold: var(--vl-turmeric-700);
  --gold-soft: rgba(242, 176, 30, 0.20);
  --on-tint: #FFF8E6;

  --bg: var(--vl-cream);
  --bg-elevated: #FFFFFF;
  --bg-tertiary: #FBEED0;
  --bar: rgba(255, 248, 230, 0.96);
  --fill: rgba(122, 0, 0, 0.06);
  --fill-strong: rgba(122, 0, 0, 0.12);
  --label: var(--vl-ink);
  --label-2: rgba(106, 74, 53, 0.92);
  --label-3: rgba(106, 74, 53, 0.50);
  --separator: rgba(122, 0, 0, 0.13);
  --green: var(--vl-leaf);
  --green-soft: rgba(46, 125, 50, 0.13);
  --red: #B3261E;
  --red-soft: rgba(179, 38, 30, 0.10);
  --orange: #B85C00;
  --orange-soft: rgba(245, 124, 0, 0.14);
  --blue: #1F6F8B;

  --font: 'Alegreya Sans', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 1px 0 rgba(122, 0, 0, 0.04), 0 10px 24px -18px rgba(59, 31, 18, 0.45);
  --shadow-float: 0 18px 44px -14px rgba(59, 31, 18, 0.45);
}

/* Same palette when the device is in dark mode */
@media (prefers-color-scheme: dark) {
  :root,
  :root:not(.x) {
    --tint: var(--vl-maroon);
    --tint-pressed: var(--vl-maroon-800);
    --tint-soft: rgba(122, 0, 0, 0.09);
    --gold: var(--vl-turmeric-700);
    --gold-soft: rgba(242, 176, 30, 0.20);
    --on-tint: #FFF8E6;
    --bg: var(--vl-cream);
    --bg-elevated: #FFFFFF;
    --bg-tertiary: #FBEED0;
    --bar: rgba(255, 248, 230, 0.96);
    --fill: rgba(122, 0, 0, 0.06);
    --fill-strong: rgba(122, 0, 0, 0.12);
    --label: var(--vl-ink);
    --label-2: rgba(106, 74, 53, 0.92);
    --label-3: rgba(106, 74, 53, 0.50);
    --separator: rgba(122, 0, 0, 0.13);
    --green: var(--vl-leaf);
    --green-soft: rgba(46, 125, 50, 0.13);
    --red: #B3261E;
    --red-soft: rgba(179, 38, 30, 0.10);
    --orange: #B85C00;
    --orange-soft: rgba(245, 124, 0, 0.14);
    --blue: #1F6F8B;
    --shadow-card: 0 1px 0 rgba(122, 0, 0, 0.04), 0 10px 24px -18px rgba(59, 31, 18, 0.45);
    --shadow-float: 0 18px 44px -14px rgba(59, 31, 18, 0.45);
  }
  .nav-brand .logo-light, .auth-logo .logo-light { display: block !important; }
  .nav-brand .logo-dark, .auth-logo .logo-dark { display: none !important; }
}

body { font-size: 18px; line-height: 1.45; letter-spacing: 0; }

/* ---------- Typography ---------- */
.large-title, .title-1, .title-2, .serif,
.section-header.big, .page-header h1, .planner-header h1, .sheet-header h2 {
  font-family: var(--font-serif);
  letter-spacing: 0;
}
.large-title, .title-1, .page-header h1, .planner-header h1 { color: var(--vl-maroon); font-weight: 800; }
.section-header.big { font-size: 25px; font-weight: 800; color: var(--vl-maroon); }
.section-header.big a, .section-header.big button { font-family: var(--font); font-weight: 700; color: var(--vl-leaf); }
.section-header { color: var(--vl-leaf); font-weight: 700; letter-spacing: 0.1em; }
.gold { color: var(--vl-turmeric-700); }

/* ---------- Header with thoranam ---------- */
.navbar {
  background: var(--vl-cream);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 3px solid var(--vl-maroon);
}
.navbar::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 100%;
  height: 34px;
  background: var(--vl-thoranam) 0 0 / 75px 34px repeat-x;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.12));
}
.page { padding-top: 46px; }
.nav-links a {
  border-radius: 0; padding: 7px 4px; margin: 0 10px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--vl-maroon); position: relative;
}
.nav-links a:hover { background: none; color: var(--vl-leaf); }
.nav-links a::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 2px;
  border-radius: 2px; background: var(--vl-turmeric); transition: left .3s, right .3s;
}
.nav-links a:hover::after, .nav-links a.active::after { left: 0; right: 0; }
.nav-links a.active { background: none; color: var(--vl-leaf); }
.nav-title { font-family: var(--font-serif); color: var(--vl-maroon); }
/* Link back to the main website */
.nav-site {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid rgba(122, 0, 0, 0.25);
  color: var(--vl-maroon); font-size: 14px; font-weight: 700; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.nav-site i { font-size: 12px; }
.nav-site:hover { background: var(--vl-maroon); border-color: var(--vl-maroon); color: var(--vl-cream); }
@media (max-width: 400px) {
  .nav-site { padding: 0 11px; }
  .nav-site span { display: none; }
  .nav-site i { font-size: 15px; }
}
.avatar { background: var(--vl-maroon); color: var(--vl-cream); box-shadow: 0 0 0 2px var(--vl-turmeric); }

/* ---------- Buttons: raised pills like the website ---------- */
.btn {
  border-radius: 999px;
  background: var(--vl-maroon); color: var(--vl-cream);
  box-shadow: 0 4px 0 var(--vl-maroon-900);
  font-weight: 700;
  transition: transform .2s, box-shadow .2s, background .2s, opacity .15s;
}
.btn:hover { background: #8F0A0A; transform: translateY(-1px); box-shadow: 0 5px 0 var(--vl-maroon-900); }
.btn:active { opacity: 1; transform: translateY(3px); box-shadow: 0 1px 0 var(--vl-maroon-900); }
.btn-lg, .btn-block { text-transform: uppercase; letter-spacing: 0.08em; font-size: 15px; }
.btn-lg { min-height: 52px; border-radius: 999px; padding: 0 26px; }
.btn-tinted { background: rgba(242, 176, 30, 0.22); color: var(--vl-maroon); box-shadow: 0 3px 0 rgba(201, 138, 6, 0.45); }
.btn-tinted:hover { background: rgba(242, 176, 30, 0.34); }
.btn-gray { background: #FBEED0; color: var(--vl-ink); box-shadow: 0 3px 0 rgba(122, 0, 0, 0.12); }
.btn-gray:hover { background: #F7E4BC; }
.btn-danger { background: var(--red-soft); color: var(--red); box-shadow: 0 3px 0 rgba(179, 38, 30, 0.2); }
.btn-gold, .btn-white {
  background: var(--vl-turmeric); color: var(--vl-maroon-900);
  box-shadow: 0 4px 0 var(--vl-turmeric-700);
}
.btn-gold:hover, .btn-white:hover { background: #FFC233; box-shadow: 0 5px 0 var(--vl-turmeric-700); }
.btn-plain, .btn-plain:hover, .btn-icon, .btn-icon:hover { box-shadow: none; transform: none; }
.btn-plain { background: transparent; color: var(--vl-maroon); }
.btn-plain:hover { background: transparent; color: var(--vl-leaf); }
.btn-icon { background: var(--fill); color: var(--vl-maroon); border-radius: 50%; }
.btn-icon.add { background: var(--vl-maroon); color: var(--vl-cream); box-shadow: 0 3px 0 var(--vl-maroon-900); }
.btn-icon.add.added { background: var(--green-soft); color: var(--vl-leaf); box-shadow: none; }
.btn-sm { box-shadow: 0 3px 0 var(--vl-maroon-900); }

/* ---------- Surfaces ---------- */
.card, .cat-tile, .quick-action {
  border: 1.5px solid rgba(122, 0, 0, 0.10);
  box-shadow: 0 6px 0 rgba(242, 176, 30, 0.45), 0 18px 30px -24px rgba(59, 31, 18, 0.6);
}
a.card, .cat-tile, .quick-action { transition: transform .25s, box-shadow .25s; }
a.card:hover, .cat-tile:hover, .quick-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 var(--vl-turmeric), 0 24px 34px -24px rgba(59, 31, 18, 0.6);
}
.list, .field-group, .empty, .prompt-card { border: 1.5px solid rgba(122, 0, 0, 0.10); }
.empty .empty-icon { background: var(--vl-turmeric); color: var(--vl-maroon); }

/* Service cards */
.service-card .media .pill { background: rgba(122, 0, 0, 0.82); color: var(--vl-cream); font-weight: 700; letter-spacing: 0.02em; }
.service-card .name { font-family: var(--font-serif); font-weight: 700; color: var(--vl-maroon); font-size: 18px; }
.price { color: var(--vl-maroon); }
.quote-card .total, .total-bar .amount, .item-row .line-total { color: var(--vl-maroon); }
.quote-card .meta i { color: var(--vl-leaf); }

/* Icon tiles in the website palette */
.icon-tile { background: var(--vl-maroon); color: var(--vl-cream); }
.icon-tile.gold { background: var(--vl-turmeric); color: var(--vl-maroon); }
.icon-tile.green { background: var(--vl-leaf); }
.icon-tile.blue { background: #1F6F8B; }
.icon-tile.orange { background: var(--vl-marigold); }
.icon-tile.gray { background: #8A6A3E; }
.icon-tile.purple { background: #A2185B; }
.cat-tile .name, .quick-action .name { color: var(--vl-maroon); font-weight: 700; }
.steps .list-row .num-badge { background: var(--vl-turmeric); color: var(--vl-maroon); font-family: var(--font-serif); font-weight: 800; }
.steps .list-row .title { font-weight: 700; color: var(--vl-maroon); }

.up-next .countdown { background: var(--vl-maroon); color: var(--vl-cream); }
.up-next .countdown strong { font-family: var(--font-serif); }
.progress > span { background: linear-gradient(90deg, var(--vl-leaf), var(--vl-turmeric)); }
.item-label { background: rgba(46, 125, 50, 0.12); color: var(--vl-leaf); }
.item-row .planner-note { background: rgba(242, 176, 30, 0.18); }
.total-bar { border: 1.5px solid rgba(122, 0, 0, 0.12); background: rgba(255, 255, 255, 0.95); }
.chip.active { background: var(--vl-maroon); color: var(--vl-cream); }
.segmented { background: #FBEED0; border-radius: 999px; padding: 3px; }
.segmented > * { border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--vl-ink-soft); }
.segmented > .active,
.segmented > .active:hover {
  background: var(--vl-maroon); color: var(--vl-cream);
  box-shadow: 0 3px 0 var(--vl-maroon-900);
}
@media (prefers-color-scheme: dark) {
  .segmented > .active { background: var(--vl-maroon); color: var(--vl-cream); }
  .msg-row.bot .bubble { background: #FFFFFF; }
  .chat-form .field-group { background: var(--vl-cream); }
  .chat-form .field { background: transparent; }
}

/* Planning assistant chat */
.msg-row.bot .bubble { border: 1.5px solid rgba(122, 0, 0, 0.10); }
.msg-row.user .bubble { background: var(--vl-maroon); color: var(--vl-cream); }

/* ---------- Home hero, as on vliyer.com ---------- */
.hero {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(242, 176, 30, 0.28), transparent 55%),
    var(--vl-sky);
  color: var(--vl-ink);
  border: 1.5px solid rgba(122, 0, 0, 0.12);
  box-shadow: 0 8px 0 rgba(242, 176, 30, 0.5), 0 30px 50px -36px rgba(59, 31, 18, 0.7);
  padding-bottom: 0;
}
.hero-content { padding-bottom: 24px; }
.hero-badge { background: rgba(255, 248, 230, 0.75); border: 1.5px solid rgba(122, 0, 0, 0.18); }
.hero .eyebrow { color: var(--vl-maroon); font-weight: 700; letter-spacing: 0.14em; }
.hero h1 { font-family: var(--font-serif); color: var(--vl-maroon); font-weight: 900; }
.hero h1 em { display: inline-block; font-style: italic; font-weight: 700; color: var(--vl-leaf); }
.hero p { color: var(--vl-ink-soft); font-size: 18px; }
.hero .btn-white { background: var(--vl-maroon); color: var(--vl-cream); box-shadow: 0 5px 0 var(--vl-maroon-900); }
.hero .btn-white:hover { background: #8F0A0A; box-shadow: 0 6px 0 var(--vl-maroon-900); }
.hero .btn-glass {
  background: rgba(255, 248, 230, 0.8); color: var(--vl-maroon);
  border: 2px solid var(--vl-maroon); box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.hero .btn-glass:hover { background: var(--vl-maroon); color: var(--vl-cream); }
.hero-strip { display: block; margin: 0 -20px; }
.hero-strip img { width: 100%; height: auto; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%); }

@media (min-width: 761px) {
  .hero { padding: 44px 44px 44px; }
  .hero-content { padding-bottom: 0; }
  .hero-strip { display: none; }
  .hero-art {
    width: 300px; padding: 0; gap: 16px;
    background: none; border: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .hero-art .arch {
    position: relative; width: 260px; aspect-ratio: 869 / 1080;
    border-radius: 999px 999px 22px 22px; overflow: hidden;
    border: 6px solid #FFFFFF;
    box-shadow: 14px 14px 0 var(--vl-turmeric), 0 30px 50px -30px rgba(94, 3, 3, 0.7);
  }
  .hero-art .arch img { width: 100%; height: 100%; object-fit: cover; }
  .hero-art .art-caption { color: var(--vl-ink-soft); font-size: 15px; margin-top: 8px; }
  .hero-art .art-caption strong { color: var(--vl-maroon); font-weight: 700; }
}

/* ---------- Phone tab bar ---------- */
@media (max-width: 760px) {
  .tabbar {
    background: var(--vl-cream);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border-top: 3px solid var(--vl-maroon);
  }
  .tabbar a { color: var(--vl-ink-soft); font-weight: 700; font-size: 11px; }
  .tabbar a.active { color: var(--vl-maroon); }
  .tabbar a.active i { color: var(--vl-maroon); text-shadow: 0 3px 0 rgba(242, 176, 30, 0.8); }
  .page { padding-top: 38px; }
  .navbar::after { height: 28px; background-size: 62px 28px; }
}

/* ---------- Login ---------- */
.auth-logo img { width: 240px; }

/* ---------- Footer: maroon band ---------- */
.site-footer {
  max-width: none;
  margin-top: 48px;
  background: var(--vl-maroon-950);
  color: rgba(255, 248, 230, 0.82);
  border-top: 0;
  position: relative;
  padding-top: 34px;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background:
    radial-gradient(circle, var(--vl-turmeric) 2px, transparent 2.5px) 0 50% / 20px 12px repeat-x,
    linear-gradient(var(--vl-turmeric), var(--vl-turmeric)) top / 100% 2px no-repeat,
    linear-gradient(var(--vl-turmeric), var(--vl-turmeric)) bottom / 100% 2px no-repeat;
}
.site-footer div:first-child { font-family: var(--font-serif); font-size: 16px; color: var(--vl-cream); }
.site-footer a { color: var(--vl-turmeric); }

/* Toasts and sheets on brand surfaces */
.toast { border: 1.5px solid rgba(122, 0, 0, 0.12); }
.toast i { color: var(--vl-leaf); }
.sheet-header h2 { color: var(--vl-maroon); font-weight: 800; }

/* ---------- View-only page for family ---------- */
.view-page .tabbar { display: none !important; }
.view-page { --tab-h: 0px; }
.view-hero {
  position: relative; overflow: hidden;
  padding: 26px 22px 22px; border-radius: var(--radius-xl);
  background: radial-gradient(ellipse at 100% 0%, rgba(242, 176, 30, 0.3), transparent 55%), var(--vl-sky);
  border: 1.5px solid rgba(122, 0, 0, 0.12);
  box-shadow: 0 8px 0 rgba(242, 176, 30, 0.5), 0 30px 50px -36px rgba(59, 31, 18, 0.7);
}
.view-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 999px;
  background: rgba(255, 248, 230, 0.8); border: 1.5px solid rgba(122, 0, 0, 0.18);
  color: var(--vl-maroon); font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
}
.view-hero h1 { font-family: var(--font-serif); font-weight: 900; color: var(--vl-maroon); font-size: clamp(28px, 6vw, 40px); line-height: 1.1; margin: 14px 0 12px; }
.view-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--vl-ink-soft); font-size: 16px; }
.view-meta i { color: var(--vl-leaf); margin-right: 4px; }
.view-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 16px; padding-top: 14px; border-top: 1px dashed rgba(122, 0, 0, 0.2); }
.view-total .label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--vl-leaf); }
.view-total strong { font-family: var(--font-serif); font-size: 32px; font-weight: 900; color: var(--vl-maroon); }
.view-item .thumb { align-self: flex-start; }
.view-notes { margin-top: 8px; }
.view-notes summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--vl-leaf); }
.view-notes .planner-note { margin-top: 6px; }
.view-suggest-btn {
  align-self: flex-start; margin-top: 10px; padding: 6px 12px; border-radius: 999px;
  border: 1.5px dashed rgba(122, 0, 0, 0.3); color: var(--vl-maroon);
  font-size: 13px; font-weight: 700; background: transparent; cursor: pointer;
}
.view-suggest-btn:hover { background: rgba(242, 176, 30, 0.18); border-style: solid; }
.view-suggest-form { scroll-margin-top: 120px; }
#suggest { scroll-margin-top: 110px; }

/* Suggestions (view page and owner's planner) */
.suggestion-row { align-items: flex-start; }
.suggestion-row .avatar { margin-top: 2px; }
.suggestion-row .title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.suggestion-row.is-done { opacity: 0.62; }
.suggestion-row.is-done .subhead { text-decoration: line-through; text-decoration-color: rgba(106, 74, 53, 0.4); }
.mt-8 { margin-top: 8px; }