:root {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #28241d;
  background: #f7f4ee;
  color-scheme: light;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: #fff;
  color: #28241d;
  border-bottom: 1px solid #e2dccf;
}
.top,
main {
  max-width: 1112px;
  margin: auto;
  padding: 0 28px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: Georgia, serif;
  letter-spacing: 0.16em;
  font-size: 1.32rem;
}
.lang {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lang select {
  font: inherit;
  color: #4b4438;
  background: #fff;
  border: 0;
  padding: 0.55em 0;
}
.lang span {
  color: #926b1c;
  font-size: 1.35rem;
}
main {
  padding-top: 40px;
  padding-bottom: 48px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-family: 'STIX Two Text', Georgia, serif;
  font-weight: 500;
  line-height: 1.14;
  font-size: clamp(2rem, 5vw, 3.55rem);
  letter-spacing: -0.035em;
  margin-bottom: 9px;
}
h2 {
  font-size: 1.11rem;
  line-height: 1.4;
  margin-bottom: 12px;
}
p {
  margin-bottom: 14px;
}
.muted,
small {
  color: #655f54;
}
.grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 24px;
}
.panel {
  background: #fff;
  border: 1px solid #e2dccf;
  border-radius: 15px;
  padding: 22px;
  margin-bottom: 16px;
}
.panel:last-child {
  margin-bottom: 0;
}
.summary {
  background: #ffffff;
  color: #28241d;
  border-color: #e2dccf;
}
.summary .muted,
.summary small {
  color: #655f54;
}
.summary hr {
  border-color: #ded7ca;
}
.amount {
  font-family: Georgia, serif;
  letter-spacing: -0.035em;
  font-size: 2.7rem;
  line-height: 1.3;
}
.row,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.actions {
  justify-content: flex-start;
  margin-top: 12px;
}
.row {
  margin: 8px 0;
}
.list {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
}
.list a {
  display: block;
}
.kicker {
  color: #705619;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.summary .kicker {
  color: #655f54;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 15px;
  min-width: 0;
}
legend,
label {
  font-weight: 600;
  font-size: 0.94rem;
}
legend {
  margin-bottom: 6px;
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pick {
  position: relative;
  flex: 1;
}
.pick input {
  position: absolute;
  opacity: 0;
}
.pick span {
  display: block;
  min-width: 47px;
  text-align: center;
  padding: 9px 6px;
  border: 1px solid #c0b6a4;
  border-radius: 6px;
}
.pick input:checked + span {
  background: #fbf1d9;
  border-color: #b0811d;
  color: #3c2c0a;
}
.pick input:focus-visible + span,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #377bb0;
  outline-offset: 3px;
}
button,
.button {
  appearance: none;
  font: inherit;
  display: inline-block;
  font-weight: 650;
  background: #b0811d;
  color: #17120a;
  border: 1px solid #b0811d;
  border-radius: 7px;
  text-align: center;
  padding: 11px 15px;
  cursor: pointer;
  text-decoration: none;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.secondary {
  background: #fff;
  color: #604919;
  border-color: #cdbfa2;
}
a {
  color: #75570e;
}
input:not([type='radio']):not([type='checkbox']),
select.field {
  font: inherit;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #b3a996;
  border-radius: 6px;
  background: white;
  color: #28241d;
}
.address {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.address label {
  display: grid;
  gap: 4px;
}
.full {
  grid-column: 1/-1;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 15px 0;
  font-weight: 400;
}
.check input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 4px;
}
.terms {
  border-top: 1px solid #ddd5c8;
  padding-top: 12px;
  font-size: 0.92rem;
}
.schedule {
  width: 100%;
  border-collapse: collapse;
}
.schedule th,
.schedule td {
  text-align: left;
  padding: 9px 4px;
  border-bottom: 1px solid #ede7dc;
}
.schedule td:last-child,
.schedule th:last-child {
  text-align: right;
}
hr {
  border: 0;
  border-top: 1px solid #dde0d8;
  margin: 14px 0;
}
.error {
  margin-top: 14px;
  border-left: 3px solid #963c26;
  background: #fff4ef;
  padding: 12px;
}
.crumb {
  display: block;
  margin-bottom: 20px;
}
details {
  margin-top: 12px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
[hidden] {
  display: none !important;
}
@media (max-width: 690px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .top,
  main {
    padding-left: 18px;
    padding-right: 18px;
  }
  main {
    padding-top: 26px;
  }
  .panel {
    padding: 17px;
  }
  .summary {
    margin-bottom: 16px !important;
  }
  .top {
    height: 62px;
  }
  .address {
    grid-template-columns: 1fr 1fr;
  }
  .schedule td,
  .schedule th {
    font-size: 0.9rem;
  }
  .grid .side {
    order: -1;
  }
}
@media (max-width: 365px) {
  .address {
    grid-template-columns: 1fr;
  }
  .actions a,
  .actions button {
    width: 100%;
  }
}
h1,
.panel a {
  overflow-wrap: anywhere;
}
.crumb {
  display: inline-block;
  color: #6f6453;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.crumb:hover,
.text-action:hover {
  text-decoration: underline;
}
.plan-title h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin: 0;
}
.plan-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 11px;
}
.plan-number {
  color: #6d6352;
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 100px;
  padding: 3px 11px;
  background: #f7ebc8;
  color: #664a0e;
  font-size: 0.82rem;
  font-weight: 700;
}
.status-chip::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b0811d;
}
.status-chip[data-status='in_grace'],
.status-chip[data-status='paused'] {
  background: #fae6dc;
  color: #763916;
}
.status-chip[data-status='in_grace']::before,
.status-chip[data-status='paused']::before {
  background: #ab541b;
}
.status-chip[data-status='expired'],
.status-chip[data-status='cancelled'] {
  background: #efece5;
  color: #645e52;
}
.status-chip[data-status='expired']::before,
.status-chip[data-status='cancelled']::before {
  background: #89806e;
}
.plan-tabs {
  display: flex;
  gap: 25px;
  margin: 25px 0 22px;
  border-bottom: 1px solid #dcd3c3;
}
.plan-tabs button {
  color: #615b50;
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  padding: 11px 2px;
  font-size: 0.94rem;
  font-weight: 600;
}
.plan-tabs button[aria-selected='true'] {
  color: #46330e;
  border-bottom-color: #b0811d;
}
.plan-summary {
  padding: 28px 30px 24px;
}
.stats {
  display: grid;
  grid-template-columns: 1.32fr 1fr 1fr 1fr;
  margin: 0;
  gap: 20px;
}
.stat {
  min-width: 0;
  padding-left: 22px;
  border-left: 1px solid #ece6da;
}
.stat:first-child {
  padding-left: 0;
  border: 0;
}
.stat dt {
  color: #666054;
  font-size: 0.91rem;
  margin-bottom: 5px;
}
.stat dd {
  font:
    500 clamp(1.4rem, 3.1vw, 2.2rem)/1.18 Georgia,
    serif;
  margin: 0;
  letter-spacing: -0.035em;
  font-variant-numeric: lining-nums tabular-nums;
}
.stat[data-stat='balance'] dd {
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  line-height: 1.03;
}
.stat small {
  font-size: 0.85rem;
}
.progress-section {
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid #e7e1d5;
}
.progress-label {
  font-size: 0.9rem;
  color: #4b4333;
  margin-bottom: 7px;
}
.progress-bar {
  height: 10px;
  background: #eae3d5;
  border-radius: 20px;
  position: relative;
}
.progress-bar i {
  display: block;
  position: absolute;
  left: 80%;
  top: -4px;
  width: 2px;
  height: 18px;
  background: #7a5a17;
}
.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #b0811d;
}
.progress-scale {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: #766d5e;
}
.lock-label {
  position: absolute;
  left: 80%;
  transform: translateX(-50%);
  color: #715313;
  font-weight: 650;
  white-space: nowrap;
}
.overview-actions:empty {
  display: none;
}
.activity-grid {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 20px;
}
.activity-grid .panel {
  height: 100%;
  margin: 0;
}
.panel h2 {
  font-size: 1.13rem;
}
.text-action {
  background: transparent;
  border: 0;
  color: #74550e;
  padding: 12px 0 0;
  font-size: 0.89rem;
  text-align: left;
}
.mode-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #e2dccf;
  border-radius: 12px;
}
.mode-note .text-action {
  padding: 4px 0;
}
#tab-panel-pay .panel,
#tab-panel-details .panel,
#tab-panel-price .panel {
  max-width: 760px;
}
#plan-notices:not(:empty) {
  margin-bottom: 18px;
}
#pay-controls details {
  margin-top: 10px;
}
#pay-controls details[open] {
  max-width: 420px;
}
#pay-controls summary {
  font-size: 0.9rem;
  color: #6a5019;
}
@media (max-width: 690px) {
  .activity-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .plan-tabs {
    gap: 0;
    justify-content: space-between;
    margin: 17px 0 16px;
  }
  .plan-tabs button {
    font-size: 0.84rem;
    padding: 10px 1px;
  }
  .plan-summary {
    padding: 19px 16px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
  }
  .stat {
    padding-left: 12px;
  }
  .stat:nth-child(odd) {
    padding-left: 0;
    border: 0;
  }
  .stat[data-stat='balance'] dd {
    font-size: 2.3rem;
  }
  .stat dd {
    font-size: 1.8rem;
  }
  .stat dt {
    font-size: 0.82rem;
  }
  .progress-section {
    margin-top: 17px;
    padding-top: 13px;
  }
  .progress-scale {
    font-size: 0.71rem;
  }
  .plan-title h1 {
    font-size: 2.05rem;
  }
  .plan-meta {
    margin-top: 8px;
  }
  .tab-content .actions {
    gap: 8px;
  }
  .tab-content .actions button {
    font-size: 0.91rem;
  }
  .mode-note {
    padding: 10px 13px;
    font-size: 0.88rem;
  }
}
@media (max-width:690px) {
  .lock-label { transform:translateX(-100%); }
}
