/* ============================================================
   Direction 2 (D-053), frozen 8 Nov 2026. Applied to the screens a
   customer sees first (sign-in, invite, welcome) via <body class="d2">.
   Fonts Anek Tamil (headings) + Hind Madurai (body); warm palette;
   the company's own accent comes from settings later (default terracotta).
   ============================================================ */
.d2 {
  --d2-cream: #F6F0E6; --d2-ink: #2A2420; --d2-ink-2: #4A4038; --d2-muted: #675D53;
  --d2-card: #FFFCF7; --d2-line: #E6DCCD; --d2-field: #D9CCB9; --d2-accent: #B4532A;
  --d2-ok-bg: #E2EFE5; --d2-ok: #22593F; --d2-warn-bg: #F8E8C8; --d2-warn: #5C3808; --d2-err-bg: #FBE3D6; --d2-err: #8E3A10;
  margin: 0; min-height: 100vh; color: var(--d2-ink); font-family: "Hind Madurai", system-ui, sans-serif; font-size: 16px; line-height: 1.45;
  background-color: var(--d2-cream);
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--d2-accent) 30%, var(--d2-cream)) 0px, color-mix(in srgb, var(--d2-accent) 10%, var(--d2-cream)) 300px, var(--d2-cream) 560px);
  background-repeat: no-repeat;
}
.d2 a { color: var(--d2-ink); text-decoration: underline; text-underline-offset: 3px; }
.d2 a.d2-btn { text-decoration: none; }  /* buttons are never underlined */
.d2 a[target="_blank"]::after { content: " \2197"; display: inline-block; margin-left: 2px; }  /* opens a PDF or photo in a new tab */
.d2 .d2-h { font-family: "Anek Tamil", system-ui, sans-serif; }

.d2-screen { position: relative; max-width: 440px; min-height: 100vh; margin: 0 auto; padding: 28px 20px 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 20px; overflow: hidden; }
.d2-screen.no-art { padding-bottom: 32px; }
.d2-brand { display: flex; align-items: center; gap: 12px; }
.d2-mark { width: 46px; height: 46px; border-radius: 13px; background: var(--d2-accent); color: #FFFCF7; display: flex; align-items: center; justify-content: center; font-family: "Anek Tamil", system-ui, sans-serif; font-size: 18px; font-weight: 700; flex: none; }
.d2-brand-name { font-family: "Anek Tamil", system-ui, sans-serif; font-size: 19px; font-weight: 600; line-height: 22px; }
.d2-title { margin: 0; font-family: "Anek Tamil", system-ui, sans-serif; font-size: 34px; line-height: 38px; font-weight: 700; }
.d2-lead { margin: 8px 0 0; font-size: 16px; line-height: 23px; color: var(--d2-ink-2); }

.d2-card { position: relative; background: var(--d2-card); border: 1px solid var(--d2-line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 30px rgba(74,52,32,.10); }
.d2-card.soft { box-shadow: none; }
.d2-card h2 { margin: 0; font-family: "Anek Tamil", system-ui, sans-serif; font-size: 17px; font-weight: 600; }
.d2-label { display: block; font-size: 13px; font-weight: 600; color: var(--d2-ink-2); margin-bottom: 6px; }
.d2-input { width: 100%; min-height: 52px; box-sizing: border-box; border: 1.5px solid var(--d2-field); border-radius: 14px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--d2-ink); background: var(--d2-card); }
.d2-input:focus { outline: 3px solid color-mix(in srgb, var(--d2-accent) 35%, transparent); border-color: var(--d2-accent); }
.d2-input[readonly] { background: #EFE7DA; color: var(--d2-ink-2); }
.d2-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; border: 0; border-radius: 15px; background: var(--d2-accent); color: #FFFCF7; font-family: "Anek Tamil", system-ui, sans-serif; font-size: 18px; font-weight: 600; cursor: pointer; text-decoration: none; box-sizing: border-box; }
.d2-btn.ghost { background: var(--d2-card); color: var(--d2-ink); border: 1.5px solid #CDBFAA; font-size: 16px; min-height: 48px; }
.d2 form.button_to { margin: 0; }
.d2-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; min-height: 44px; cursor: pointer; }
.d2-check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--d2-ink); }
.d2-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; color: var(--d2-ink-2); }
.d2-small { font-size: 13px; color: var(--d2-muted); line-height: 18px; margin: 0; }
.d2-flash { border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.d2-flash.alert { background: var(--d2-err-bg); color: var(--d2-err); }
.d2-flash.notice { background: var(--d2-ok-bg); color: var(--d2-ok); }
.d2-chip { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #EFE7DA; color: var(--d2-ink); }
.d2-hero { border-radius: 18px; padding: 18px 16px; color: #FFFCF7; background: linear-gradient(135deg, #3A2C22 0%, #221C18 55%, color-mix(in srgb, var(--d2-accent) 70%, #221C18) 100%); }
.d2-hero .d2-title { font-size: 28px; line-height: 32px; }
.d2-hero p { margin: 4px 0 0; font-size: 14px; color: #E9DFD0; }
.d2-project { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid #EFE7DA; }
.d2-project:first-of-type { border-top: 0; padding-top: 0; }
.d2-project strong { font-size: 17px; }
.d2-art { position: relative; margin: auto -70px -6px; padding-top: 24px; pointer-events: none; }
.d2-art img { width: 100%; height: auto; display: block; opacity: .9; }
.d2-art::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 60px; background: linear-gradient(180deg, var(--d2-cream) 0%, rgba(246,240,230,0) 100%); z-index: 1; }
.d2-powered { position: absolute; right: 16px; bottom: 10px; z-index: 1; font-size: 12px; color: var(--d2-ink-2); background: rgba(246,240,230,.85); padding: 2px 8px; border-radius: 6px; }
.d2-screen.no-art .d2-powered { position: static; align-self: center; }

/* Show / Hide inside a password box (password_reveal_controller.js). */
.reveal-wrap { position: relative; display: block; }
.reveal-wrap .d2-input { padding-right: 76px; }
.reveal-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 40px; min-width: 60px; border: 0; border-radius: 10px; background: transparent; color: var(--d2-accent); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.reveal-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--d2-accent) 35%, transparent); }
