/* Durgasutra. The page is an aged print sheet: paper ground, old-press type, vermilion ink. */
:root {
  --paper: #E9DCC0; --field: #FBF5E6; --ink: #2B1D12; --ink-2: #3D2C1C; --muted: #5A4632;
  --red: #A3271C; --rule: #8A6A3A; --line: #8A7353; --ochre: #7A4E12; --cream: #FFF6E4;
  --display: 'IM Fell English', Georgia, serif;
  --text: 'EB Garamond', Georgia, serif;
  --deva: 'Eczar', 'Noto Serif Devanagari', serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font-family: var(--text); font-size: 20px; line-height: 1.5;
  background: var(--paper) url(paper.jpg) 0 0 / 820px 820px;
}
img { max-width: 100%; }
a { color: var(--ink); }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::placeholder { color: #75614A; opacity: 1; }
h1, h2, h3, p, figure, ol, ul, fieldset { margin: 0; }
h1, h2, .h-display { font-family: var(--display); font-weight: 400; }
[lang="sa"], [lang="hi"] { font-family: var(--deva); }
.price { font-family: var(--text), var(--deva); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 28px; }
.kicker { font-size: 19px; font-variant-caps: all-small-caps; letter-spacing: 0.12em; color: var(--ochre); }
.muted { color: var(--muted); }
.note { font-size: 17px; line-height: 1.35; color: var(--muted); }

/* Header */
.top { max-width: 1160px; margin: 0 auto; padding: 16px 28px 0; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 54px; height: 54px; flex: none; display: block; }
.brand span { font-family: var(--display); font-size: 31px; line-height: 1; color: var(--ink); }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 26px; font-size: 19px; }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--display); font-size: 23px; line-height: 1.1; text-align: center; text-decoration: none;
  padding: 14px 26px; min-height: 56px; background: var(--red); color: var(--cream); border: 0; border-radius: 2px; cursor: pointer;
  box-shadow: inset 0 0 0 4px var(--red), inset 0 0 0 5px rgba(255, 240, 212, 0.6);
}
.btn:hover { color: var(--cream); background: #8E2017; box-shadow: inset 0 0 0 4px #8E2017, inset 0 0 0 5px rgba(255, 240, 212, 0.6); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn-pay { width: 100%; font-size: 25px; padding: 15px 20px; min-height: 60px; }

/* Hero: the print and the whole order form on one screen, nothing to scroll.
   Sizes in here are in em. On a wide screen the type follows the screen's height, so the form always ends where the screen does. */
.hero {
  --h: clamp(540px, calc(100vh - 36px), 880px); --gap: 1.05em;
  max-width: 1640px; margin: 0 auto; padding: 18px 28px; min-height: min(100vh, 916px);
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "plate top" "plate order";
  column-gap: clamp(26px, 3.4vw, 60px);
  font-size: clamp(16px, min(calc(2.95vh - 1px), 1.55vw), 21px); line-height: 1.35;
}
@supports (height: 100svh) {
  .hero { --h: clamp(540px, calc(100svh - 36px), 880px); min-height: min(100svh, 916px); font-size: clamp(16px, min(calc(2.95svh - 1px), 1.55vw), 21px); }
}
.hero .top { grid-area: top; max-width: none; margin: 0; padding: 0 0 0.9em; flex-wrap: nowrap; }
.hero .brand { gap: 0.55em; }
.hero .brand img { width: 2.5em; height: 2.5em; }
.hero .brand span { font-size: 1.55em; }
.hero .top nav { font-size: 0.95em; gap: 0.2em 1.3em; justify-content: flex-end; }
.plate { grid-area: plate; align-self: start; min-width: 0; width: min(calc(var(--h) * 0.7457), 42vw, 640px); }
.plate img { display: block; width: 100%; height: auto; box-shadow: 0 0 0 1px rgba(43, 29, 18, 0.28), 0 18px 28px -22px rgba(43, 29, 18, 0.7); }
.plate .darshan { display: none; }
.order {
  grid-area: order; align-self: start; min-width: 0; max-width: 46em; min-height: min(calc(var(--h) - 3.4em), 34em);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "head head" "ask who"; gap: 1.15em 2em;
}
.head { grid-area: head; }
.verse { font-family: var(--deva); font-size: 0.95em; line-height: 1.4; color: var(--red); text-wrap: balance; }
.verse br { display: none; }
.order h1 { font-size: 2.7em; line-height: 1; margin-top: 0.1em; }
.lede { font-size: 1.02em; color: var(--ink-2); margin-top: 0.4em; }
.ask, .who { min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.ask { grid-area: ask; }
.who { grid-area: who; justify-content: space-between; }
.pair { display: contents; }

/* A field's name is printed on its top border, the way a paper form does it. What is wrong with a field takes the same place, in red. */
.field { position: relative; display: flex; flex-direction: column; min-width: 0; }
.field > label, .field > .err {
  position: absolute; z-index: 1; top: 0; left: 0.5em; transform: translateY(-52%); max-width: calc(100% - 1em); padding: 0 0.4em;
  font-size: 0.8em; line-height: 1.3; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(to bottom, transparent calc(52% - 1px), var(--field) calc(52% - 1px));
}
.field > .err { color: var(--red); }
.field:has(> .err:not(:empty)) > label { opacity: 0; }
input[type="text"], input[type="tel"], textarea {
  font: inherit; line-height: 1.35; width: 100%; padding: 0.66em 0.72em 0.5em; border: 1px solid var(--line); border-radius: 2px;
  background: var(--field); color: var(--ink);
}
textarea { display: block; resize: none; }
/* The box being typed in gets a heavier border of its own. A ring around the box would cut through the name on its top border. */
input[type="text"]:focus, input[type="tel"]:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
[aria-invalid="true"] { border-color: var(--red) !important; box-shadow: 0 0 0 1px var(--red); }
input[type][aria-invalid="true"]:focus, textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 1px var(--red), inset 0 0 0 1px var(--red); }
.err { font-size: 17px; line-height: 1.3; color: var(--red); font-weight: 600; }
.err:empty { display: none; }
.hero .note, .pay .err { font-size: 0.82em; line-height: 1.3; }

.plans-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 0.8em; margin-bottom: 0.3em; font-size: 0.84em; line-height: 1.3; font-weight: 600; color: var(--ink-2); }
.offer { font-style: italic; font-weight: 400; color: var(--muted); }
.plans { display: flex; gap: 0.45em; }
.plan { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: 0.42em 0.6em 0.38em; border: 1px solid var(--line); border-radius: 2px; background: rgba(251, 245, 230, 0.5); cursor: pointer; }
.plan:has(input:checked) { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); background: var(--field); }
.plan .name { font-size: 0.84em; line-height: 1.25; font-weight: 600; white-space: nowrap; }
.plan .cost { display: flex; flex-direction: column; }
.plan .price { font-size: 1.45em; line-height: 1.1; font-weight: 500; }
.plan:has(input:checked) .price { color: var(--red); }
.plan s { font-size: 0.78em; line-height: 1.2; color: var(--muted); }
/* The choice itself shows on the whole box, so the round dot is kept for the keyboard and screen readers only. */
.plan input, .ampm input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.plan:has(input:focus-visible), .ampm:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }

/* The question and its situation. The situation box takes whatever height is left. With two or three questions,
   one shows at a time and the names on the box's top border switch between them. */
#questions { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.qblock { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: var(--gap); }
.ask-q textarea { height: calc(2.7em + 1.16em + 2px); max-height: calc(5.4em + 1.16em + 2px); }
.about { flex: 1 1 auto; }
.about textarea { flex: 1 1 auto; min-height: calc(4.05em + 1.16em + 2px); }
.about .note { margin-top: 0.35em; }
.qpick { position: absolute; z-index: 2; top: 0; left: 0.5em; transform: translateY(-50%); display: flex; gap: 0.3em; }
.qpick button {
  position: relative; font: inherit; font-size: 0.8em; line-height: 1.3; font-weight: 600; padding: 0.2em 0.7em; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 2px; background: var(--field); color: var(--ink-2); cursor: pointer;
}
.qpick button::after { content: ""; position: absolute; inset: -0.6em -0.1em; }
.qpick button[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.qpick button.bad { border-color: var(--red); color: var(--red); }
.qpick button.bad[aria-current="true"] { background: var(--red); color: var(--cream); }
#questions.multi .ask-q textarea { padding-top: 0.8em; padding-bottom: 0.36em; }
#questions.multi .ask-q > label, #questions.multi .ask-q > .err { clip-path: inset(50%); opacity: 0; pointer-events: none; }

/* The country code and the number share one box. The code starts as +91 and follows the visitor's country. */
.tel { display: flex; border: 1px solid var(--line); border-radius: 2px; background: var(--field); }
.tel input { min-width: 0; border: 0; background: none; box-shadow: none; }
.tel #cc { flex: none; width: 3.5em; padding-right: 0.3em; border-right: 1px solid rgba(138, 115, 83, 0.45); border-radius: 0; }
.tel input[type]:focus, .tel input[type][aria-invalid="true"], .tel input[type][aria-invalid="true"]:focus { box-shadow: none; }
.tel:focus-within { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tel:has([aria-invalid="true"]) { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.tel:has([aria-invalid="true"]):focus-within { box-shadow: 0 0 0 1px var(--red), inset 0 0 0 1px var(--red); }
.born { display: contents; }
.time { display: flex; gap: 0.35em; align-items: stretch; }
.time input[type="text"] { flex: 1 1 0; min-width: 0; }
.ampm { position: relative; flex: none; display: flex; align-items: center; justify-content: center; min-width: 3em; border: 1px solid var(--line); border-radius: 2px; background: rgba(251, 245, 230, 0.5); font-size: 0.9em; font-weight: 600; cursor: pointer; }
.ampm:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.field:has(> .err:not(:empty)) .ampm:not(:has(input:checked)) { border-color: var(--red); color: var(--red); }
.pay { display: flex; flex-direction: column; gap: 0.4em; }
.btn-pay { width: 100%; font-size: 1.28em; padding: 0.55em 0.8em; min-height: 2.5em; }
.pay .err:not(:empty) + .note { display: none; }
.done { display: flex; flex-direction: column; gap: 0.7em; align-self: center; min-height: 0; max-width: 30em; border: 2px solid var(--red); background: var(--field); padding: 1.2em 1.2em 1.3em; }
.done h2 { font-size: 1.9em; line-height: 1.05; }
[hidden] { display: none !important; }

/* A small laptop or a tablet on its side: a narrower print, so the two columns of the form keep their width. */
@media (max-width: 1240px) {
  .plate { width: min(calc(var(--h) * 0.7457), 36vw); }
  .order { column-gap: 1.5em; }
  .plan { padding-left: 0.45em; padding-right: 0.45em; }
  .plan .price { font-size: 1.25em; }
  .btn-pay { font-size: 1.12em; }
}

/* A narrow screen: the upper half of the print across the top, as tall as the screen can spare, and the form under it. */
@media (max-width: 1023px) {
  .hero { display: flex; flex-direction: column; max-width: none; padding: 0 0 12px; min-height: 100vh; min-height: 100svh; font-size: 17px; --gap: 13px; }
  .hero .top { padding: 5px 16px; }
  .hero .brand img { width: 34px; height: 34px; }
  .hero .brand span { font-size: 24px; }
  .hero .top nav { flex-direction: column; align-items: flex-end; gap: 0; font-size: 14px; line-height: 1.25; }
  .plate { position: relative; align-self: stretch; width: auto; flex: 4 1 0; min-height: 44px; max-height: 62vw; }
  .plate .sheet { display: none; }
  .plate .darshan { display: block; position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: 50% 22%; box-shadow: 0 1px 0 rgba(43, 29, 18, 0.28), 0 -1px 0 rgba(43, 29, 18, 0.28); }
  .order { display: flex; flex-direction: column; align-self: center; flex: 0 0 auto; gap: var(--gap); width: 100%; max-width: 592px; min-height: 0; padding: 8px 16px 0; }
  .verse { font-size: 13px; }
  .verse br { display: inline; }
  .order h1 { font-size: 30px; margin-top: 2px; }
  .lede { display: none; }
  .who { justify-content: flex-start; }
  .pair { display: flex; gap: 8px; }
  .pair > .field { flex: 1 1 0; }
  .born > .field:last-child { flex-grow: 1.42; }
  input[type="text"], input[type="tel"], textarea { padding-left: 0.6em; padding-right: 0.6em; }
  .ask-q textarea { height: calc(1.35em + 1.16em + 2px); }
  .about { flex: none; }
  .about textarea { flex: none; height: calc(2.7em + 1.16em + 2px); min-height: 0; }
  .about .note { display: none; }
  .plan { padding: 0.36em 0.4em 0.3em; }
  .plan .cost { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 0.3em; }
  .plan .price { font-size: 1.2em; }
  .plan s { font-size: 0.74em; }
  .ampm { min-width: 2.6em; }
  .btn-pay { font-size: 1.24em; min-height: 48px; padding: 0.45em 0.6em; }
  .done { flex: none; margin: 20px 16px; width: auto; }
}
/* A tall phone has room for the line under the title and a third line of situation; a short one gets smaller type, and the shortest gives up the verse. */
@media (max-width: 1023px) and (min-height: 800px) {
  .lede { display: block; font-size: 16px; line-height: 1.3; margin-top: 4px; }
  .about textarea { height: calc(4.05em + 1.16em + 2px); }
}
@media (max-width: 1023px) and (max-height: 729px) { .hero { font-size: 16px; --gap: 12px; } }
@media (max-width: 380px) {
  .hero { font-size: 16px; }
  #dob::placeholder, #tob::placeholder { font-size: 0.88em; }
}
@media (max-width: 1023px) and (max-height: 619px) { .verse { display: none; } }

/* Sections below the hero */
.band { border-top: 4px double var(--rule); padding: 60px 0 64px; }
.band h2 { font-size: 44px; line-height: 1.08; }
.center { text-align: center; }
.parts { list-style: none; padding: 0; margin-top: 34px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 30px 36px; }
.parts li { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--rule); padding-top: 12px; }
.num { font-family: var(--display); font-style: italic; font-size: 30px; line-height: 1.1; color: var(--red); }
.parts h3 { font-size: 24px; font-weight: 600; line-height: 1.2; }
.parts p { color: var(--ink-2); }
.sample-link { margin-top: 34px; font-size: 21px; font-style: italic; }
.sample-link a { color: var(--red); }
.split { display: flex; flex-wrap: wrap; gap: 28px 64px; align-items: center; justify-content: center; }
.split.rev { flex-wrap: wrap-reverse; }
.split .copy { flex: 1 1 400px; min-width: 0; max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.split ul { padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; }
.vignette { flex: 0 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.vignette.wide { flex-basis: 400px; }
.vignette img { display: block; width: 100%; max-width: 290px; height: auto; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%); }
.vignette.wide img { max-width: 400px; }
.vignette figcaption { font-size: 17px; font-style: italic; color: var(--muted); text-align: center; }
.soon { font-size: 17px; font-style: italic; color: var(--muted); }

.foot { border-top: 4px double var(--rule); padding: 30px 0 48px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.foot .crest { display: block; width: 170px; height: auto; }
.foot .name { font-family: var(--display); font-size: 30px; line-height: 1; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: center; font-size: 19px; }

/* Sample report */
.report { max-width: 800px; margin: 0 auto; padding: 34px 28px 0; display: flex; flex-direction: column; gap: 46px; }
.report .title { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.report .title h1 { font-size: 58px; line-height: 1; }
.report .title p:last-child { max-width: 560px; font-style: italic; color: var(--muted); }
.report section { border-top: 4px double var(--rule); padding-top: 26px; display: flex; flex-direction: column; gap: 18px; }
.asked { font-family: var(--display); font-style: italic; font-size: 30px; line-height: 1.2; }
.part { display: flex; align-items: baseline; gap: 14px; }
.part .num { font-size: 34px; line-height: 1; }
.part h2 { font-size: 40px; line-height: 1.08; }
.answer h3 { font-size: 22px; font-weight: 600; line-height: 1.25; color: var(--red); }
.answer p { font-size: 23px; line-height: 1.4; margin-top: 4px; }
.report h3.sub { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.1; margin-top: 8px; }
.report h3.small { font-size: 22px; font-weight: 600; line-height: 1.25; margin-top: 8px; }
.mantra { font-family: var(--deva); font-weight: 500; font-size: 26px; line-height: 1.4; color: var(--red); }
.mantras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px 36px; }
.shakti { border-left: 3px solid var(--red); padding-left: 16px; }
.shakti span { display: block; font-family: var(--deva); font-weight: 500; font-size: 1.1em; color: var(--red); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; line-height: 1.35; }
th { text-align: left; padding: 8px 14px 8px 0; border-bottom: 2px solid var(--ink); font-weight: 600; font-variant-caps: all-small-caps; letter-spacing: 0.08em; color: var(--muted); }
td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th:last-child, td:last-child { padding-right: 0; white-space: nowrap; }
td.when { white-space: nowrap; font-weight: 600; }
td.sure { font-weight: 600; color: var(--red); }
.dates { min-width: 520px; }
.agree { min-width: 680px; font-size: 18px; }
.agree td:first-child { font-weight: 600; }
.steps { padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.forty { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; max-width: 540px; }
.forty span { aspect-ratio: 1 / 1; border: 1px solid var(--line); background: rgba(251, 245, 230, 0.6); padding: 2px 5px; font-size: 15px; line-height: 1.2; color: var(--muted); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 26px 36px; }
.charts figure { display: flex; flex-direction: column; gap: 6px; }
.charts img { display: block; width: 100%; height: auto; }
.charts figcaption { font-size: 17px; line-height: 1.35; color: var(--ink-2); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 22px 36px; }
.cols ul { list-style: none; padding: 0; margin-top: 8px; display: flex; flex-direction: column; gap: 7px; font-size: 18px; line-height: 1.35; }
.cols h3 { font-size: 22px; font-weight: 600; line-height: 1.25; }
.fine { font-size: 18px; line-height: 1.45; }
.ending { border-top: 4px double var(--rule); padding: 34px 0 56px; display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.ending img { display: block; width: 150px; height: auto; }
.ending .h-display { font-size: 34px; line-height: 1.1; }

/* Phones */
@media (max-width: 860px) {
  body { font-size: 19px; }
  .top { padding: 10px 16px 0; }
  .brand img { width: 46px; height: 46px; }
  .brand span { font-size: 27px; }
  .top nav { font-size: 17px; gap: 2px 18px; }
  .wrap { padding: 0 16px; }
  .band { padding: 44px 0 48px; }
  .band h2, .part h2 { font-size: 34px; }
  .report { padding: 22px 16px 0; gap: 36px; }
  .report .title h1 { font-size: 42px; }
  .asked { font-size: 25px; }
  .answer p { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
