:root {
  --cream: #f7f4ee;
  --paper: #fffefa;
  --ink: #242321;
  --ink-strong: #111210;
  --muted: #6f6c66;
  --sand: #d8ccba;
  --gold: #b4935a;
  --gold-dark: #8b6a36;
  --forest: #173f36;
  --forest-deep: #102f29;
  --ocean: #2f7f88;
  --line: rgba(36, 35, 33, 0.16);
  --danger: #8c3f38;
  --serif: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  --sans: Manrope, "Avenir Next", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
  font-family: var(--sans);
}

* { box-sizing: border-box; }

html { background: var(--cream); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }

.is-hidden { display: none !important; }

.auth-shell {
  width: min(1216px, calc(100% - 48px));
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 0 max(36px, env(safe-area-inset-bottom));
}

.site-mark {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 0 2px 17px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -0.015em;
}

.site-mark__product {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(330px, 43%) minmax(0, 57%);
  min-height: 540px;
  margin-top: 22px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 22px 70px rgba(26, 42, 36, 0.06);
  animation: reveal 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card__art {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  padding: clamp(28px, 3.3vw, 44px);
  background: var(--forest);
  color: var(--cream);
  isolation: isolate;
}

.auth-card__art::before,
.auth-card__art::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.auth-card__art::before {
  width: 76%;
  aspect-ratio: 1.7;
  right: -17%;
  top: 12%;
  border: 1px solid rgba(247, 244, 238, 0.16);
  border-radius: 50%;
  transform: rotate(-18deg);
  box-shadow: 0 0 0 42px rgba(247, 244, 238, 0.035), 0 0 0 84px rgba(247, 244, 238, 0.025);
}

.auth-card__art::after {
  width: 1px;
  height: 44%;
  right: 19%;
  top: 0;
  background: rgba(180, 147, 90, 0.42);
  transform: rotate(29deg);
  transform-origin: top;
}

.auth-card__art--calm { background: var(--forest-deep); }

.brand-panel__coordinates {
  display: flex;
  position: relative;
  z-index: 2;
  justify-content: space-between;
  gap: 16px;
  color: rgba(247, 244, 238, 0.64);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-panel__mark {
  display: flex;
  position: relative;
  z-index: 2;
  align-self: center;
  width: min-content;
  flex-direction: column;
  padding-bottom: 19px;
  border-bottom: 1px solid rgba(180, 147, 90, 0.7);
  margin: 6px 0 26px;
}

.brand-panel__the {
  margin: 0 0 2px 3px;
  font-family: var(--serif);
  font-size: clamp(17px, 1.7vw, 23px);
  font-style: italic;
  line-height: 1;
}

.brand-panel__title {
  font-family: var(--serif);
  font-size: clamp(51px, 5.1vw, 70px);
  font-weight: 400;
  line-height: 0.76;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.brand-panel__route {
  position: absolute;
  right: -55px;
  bottom: 48px;
  width: 218px;
  height: 218px;
  border: 1px solid rgba(247, 244, 238, 0.19);
  border-radius: 50%;
}

.brand-panel__route::before {
  content: "TTP";
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(247, 244, 238, 0.48);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.32em;
  transform: translate(-50%, -50%);
}

.brand-panel__route::after {
  content: "";
  position: absolute;
  top: 34px;
  left: 40px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--forest);
}

.brand-panel__route > span {
  position: absolute;
  top: 52%;
  left: -12%;
  width: 80%;
  height: 1px;
  background: rgba(180, 147, 90, 0.6);
  transform: rotate(-22deg);
}

.brand-panel__folio {
  display: flex;
  position: relative;
  z-index: 2;
  align-items: center;
  gap: 11px;
  color: rgba(247, 244, 238, 0.62);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand-panel__folio > span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(180, 147, 90, 0.66);
  border-radius: 50%;
  color: #d8bd8c;
  letter-spacing: 0;
}

.auth-card__body {
  align-self: center;
  width: min(500px, calc(100% - 72px));
  margin: 0 auto;
  padding: 30px 0;
}

.auth-card__body--full { grid-column: 1 / -1; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: clamp(44px, 3.7vw, 52px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.lede {
  max-width: 33rem;
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.login-form { margin-top: 30px; }

.login-form label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid rgba(36, 35, 33, 0.25);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.login-form input::placeholder { color: #98938a; }

.login-form input:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
  border-color: var(--forest);
  box-shadow: 0 0 0 5px rgba(23, 63, 54, 0.09);
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 46px;
  border-radius: 0;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  margin-top: 12px;
  padding: 14px 18px;
  border: 1px solid var(--forest);
  background: var(--forest);
  color: var(--cream);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.primary-button:hover:not(:disabled) {
  border-color: var(--forest-deep);
  background: var(--forest-deep);
  transform: translateY(-1px);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 3px;
}

.primary-button:disabled { cursor: wait; opacity: 0.58; }

.secondary-button {
  padding: 10px 16px;
  border: 1px solid rgba(23, 63, 54, 0.34);
  background: transparent;
  color: var(--forest);
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: rgba(180, 147, 90, 0.7);
  text-underline-offset: 5px;
}

.form-message,
.privacy-note,
.support-copy,
.account-email {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.form-message {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--danger);
}

.privacy-note {
  margin: 8px 0 0;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.support-copy { margin: 15px 0 22px; }

.loading-line {
  width: min(260px, 100%);
  height: 2px;
  margin-top: 36px;
  overflow: hidden;
  background: var(--sand);
}

.loading-line::after {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  background: var(--forest);
  animation: loading 1.1s ease-in-out infinite alternate;
}

.dashboard { padding: 54px 0; }

.dashboard__top,
.planner-stage__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.dashboard h1 { font-size: clamp(48px, 6vw, 76px); }
.account-email { margin: 14px 0 0; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
  margin-top: 48px;
}

.product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(28, 44, 38, 0.055);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.product-card:hover {
  border-color: rgba(23, 63, 54, 0.28);
  box-shadow: 0 24px 58px rgba(28, 44, 38, 0.09);
  transform: translateY(-3px);
}

.product-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sand);
}

.product-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(16, 47, 41, 0.2));
}

.product-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 220ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-card__media img { transform: scale(1.025); }

.product-card__body {
  display: flex;
  min-height: 300px;
  flex: 1;
  flex-direction: column;
  padding: 25px 26px 27px;
}

.product-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.product-card__label {
  color: var(--gold-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.product-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(23, 63, 54, 0.22);
  color: var(--forest);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.product-card h2 {
  margin: 23px 0 11px;
  font-family: var(--serif);
  font-size: clamp(34px, 3vw, 42px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.product-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.product-card__description { min-height: 4.8em; font-size: 14px; }

.product-card__status {
  margin-top: auto;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.product-card__status > p {
  min-height: 3.1em;
  font-size: 12px;
  line-height: 1.55;
}

.product-card__status .primary-button { margin: 14px 0 0; }

.product-card--active {
  border-color: rgba(23, 63, 54, 0.36);
  box-shadow: 0 22px 64px rgba(18, 51, 43, 0.11);
}

.product-card--active .product-card__badge {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--cream);
}

.product-card--locked { background: rgba(255, 254, 250, 0.72); }
.product-card--locked .product-card__media img { filter: saturate(0.76) contrast(0.94); }
.product-card--locked .product-card__badge { color: #625f59; border-color: rgba(98, 95, 89, 0.28); }

.product-card--coming-soon { background: rgba(255, 254, 250, 0.58); }
.product-card--coming-soon .product-card__media img { filter: saturate(0.48) contrast(0.9) brightness(1.04); }
.product-card--coming-soon .product-card__media::after { background: rgba(247, 244, 238, 0.16); }
.product-card--coming-soon .product-card__badge { color: var(--gold-dark); border-color: rgba(139, 106, 54, 0.3); }

.dashboard-message {
  margin-top: 28px;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  background: var(--paper);
  color: var(--muted);
}

.planner-stage { width: 100vw; margin-left: calc(50% - 50vw); margin-top: 22px; }

.planner-stage__bar {
  padding: 13px max(16px, calc((100vw - 1180px) / 2));
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.planner-stage__bar .eyebrow { margin-bottom: 4px; font-size: 10px; }
.planner-loading { padding: 72px 20px; text-align: center; color: var(--muted); }
.planner-frame { display: block; width: 100%; min-height: calc(100vh - 108px); border: 0; background: #f3f7f5; }

@keyframes loading { to { transform: translateX(122%); } }

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) and (min-width: 761px) {
  .auth-card { grid-template-columns: 40% 60%; }
  .auth-card__body { width: min(460px, calc(100% - 48px)); }
  .brand-panel__title { font-size: clamp(45px, 6.2vw, 56px); }
  .product-grid { grid-template-columns: 1fr; max-width: 720px; }
}

@media (max-width: 1080px) and (min-width: 901px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .auth-shell {
    width: min(100% - 20px, 560px);
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(22px, env(safe-area-inset-bottom));
  }

  .site-mark { padding-bottom: 12px; font-size: 17px; }
  .site-mark__product { font-size: 8px; letter-spacing: 0.18em; }

  .auth-card {
    display: block;
    min-height: auto;
    margin-top: 12px;
    box-shadow: 0 16px 44px rgba(26, 42, 36, 0.05);
  }

  .auth-card__art {
    display: block;
    height: 176px;
    padding: 17px 20px;
  }

  .auth-card__art::before { width: 54%; right: -7%; top: 8%; }
  .auth-card__art::after { right: 21%; height: 78%; }
  .brand-panel__coordinates { font-size: 7px; }

  .brand-panel__mark {
    position: absolute;
    top: 47px;
    left: 20px;
    padding-bottom: 10px;
    margin: 0;
  }

  .brand-panel__the { margin-left: 2px; font-size: 13px; }
  .brand-panel__title { font-size: 37px; line-height: 0.75; }

  .brand-panel__route {
    right: -33px;
    bottom: -54px;
    width: 174px;
    height: 174px;
  }

  .brand-panel__route::before { font-size: 10px; }
  .brand-panel__route::after { top: 28px; left: 30px; }

  .brand-panel__folio {
    position: absolute;
    right: 17px;
    bottom: 15px;
    font-size: 7px;
  }

  .brand-panel__folio > span { width: 27px; height: 27px; }

  .auth-card__body {
    width: auto;
    padding: 28px 22px 30px;
  }

  .eyebrow { margin-bottom: 13px; font-size: 9px; }
  h1 { font-size: clamp(40px, 11.4vw, 50px); line-height: 0.98; }
  .lede { margin-top: 16px; font-size: 15px; line-height: 1.55; }
  .login-form { margin-top: 23px; }
  .login-form input { min-height: 52px; }
  .primary-button { min-height: 50px; }
  .privacy-note { padding-top: 14px; }

  .dashboard { padding-top: 34px; }
  .dashboard__top { display: block; }
  .dashboard__top .secondary-button { margin-top: 20px; }
  .product-grid { grid-template-columns: 1fr; gap: 20px; margin-top: 30px; }
  .product-card__body { min-height: 292px; padding: 23px 22px 24px; }
  .product-card__description { min-height: 0; }
  .product-card__status { margin-top: 24px; }
  .product-card__status > p { min-height: 0; }
  .planner-stage__bar { align-items: center; padding: 10px 12px; }
  .planner-stage__bar .secondary-button { min-height: 44px; font-size: 12px; }
}

@media (max-width: 380px) {
  .auth-card__art { height: 164px; }
  .auth-card__body { padding-inline: 19px; }
  h1 { font-size: 39px; }
}

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