:root {
  font:
    16px/1.5 "Segoe UI",
    Tahoma,
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a,
.link {
  color: var(--brand);
}
:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}
.mast,
main,
footer {
  width: min(1120px, 92%);
  margin-inline: auto;
}
.mast,
footer,
.actions,
.roles,
.brand {
  display: flex;
  align-items: center;
}
.mast,
footer {
  justify-content: space-between;
}
.mast {
  padding-block: 21px;
  border-bottom: 1px solid var(--rule);
}
.brand {
  gap: 10px;
  font-size: 1.55rem;
  font-weight: 700;
  text-decoration: none;
}
.latin {
  font:
    1.12rem/1.4 Georgia,
    serif;
  border-inline-start: 1px solid var(--rule);
  padding-inline-start: 10px;
}
.quiet,
.secondary,
.primary,
.link {
  border-radius: 8px;
  font-weight: 600;
}
.quiet,
.secondary {
  padding: 7px 15px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--brand);
}
.quiet:hover,
.secondary:hover {
  background: var(--lavender);
}
main {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(34px, 6vw, 92px);
  align-items: start;
  padding-block: clamp(26px, 5vw, 64px);
}
.portrait {
  margin: 0;
  min-width: 0;
}
.picture {
  height: clamp(480px, 65vh, 690px);
  position: relative;
  overflow: hidden;
  border-radius: 120px 120px 7px 7px;
  background: var(--navy);
  isolation: isolate;
}
.picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: sepia(0.22);
}
.picture::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    #0e3453f7 0%,
    #123c5d99 25%,
    transparent 65%
  );
}
.story {
  z-index: 1;
  position: absolute;
  inset-inline: clamp(20px, 4vw, 48px);
  bottom: 36px;
  color: white;
}
.story p {
  margin: 0;
}
.story h2 {
  font:
    normal clamp(2.4rem, 4.4vw, 4.25rem)/1.17 Georgia,
    "Segoe UI",
    serif;
  margin: 12px 0;
}
.credit {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  margin-block-start: 9px;
  text-underline-offset: 3px;
}
.panel {
  padding-block: clamp(4px, 2.7vw, 34px);
  max-width: 480px;
  width: 100%;
  min-width: 0;
}
.eyebrow {
  font-weight: 700;
  letter-spacing: 0.065em;
  font-size: 0.81rem;
  margin: 0;
  color: var(--dashboard-blue);
}
.panel h1 {
  font:
    normal clamp(2.35rem, 4vw, 3.8rem)/1.18 Georgia,
    "Segoe UI",
    serif;
  margin: 10px 0;
}
.panel h2 {
  font-size: 1.24rem;
  margin: 22px 0 7px;
}
.muted,
.switch,
small,
#vendor-note {
  color: var(--muted);
}
.muted {
  margin: 0 0 24px;
}
form {
  display: grid;
  gap: 15px;
}
label,
legend {
  font-weight: 600;
}
form > label {
  display: grid;
  gap: 5px;
}
input:not([type="radio"]) {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
}
input[type="radio"] {
  accent-color: var(--brand);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  margin-bottom: 5px;
}
.roles {
  gap: 10px;
}
.roles label {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.roles label:has(input:checked) {
  border-color: var(--brand);
  background: var(--lavender);
}
small {
  margin-top: -10px;
}
.primary {
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: 12px 18px;
}
.primary:hover {
  background: var(--navy-dark);
}
.link {
  background: none;
  border: 0;
  padding: 3px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.switch {
  margin: 20px 0;
}
.actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}
#notice:not(:empty),
.workspace {
  background: var(--tint);
  border-inline-start: 3px solid var(--dashboard-blue);
  padding: 9px 13px;
  border-radius: 4px;
  margin-block: 10px;
}
#notice[data-fail="true"]:not(:empty) {
  background: #f9eae1;
  border-color: #a14d29;
  color: #713315;
}
dl {
  margin: 15px 0;
  padding: 8px 16px;
  background: var(--tint);
  border-radius: 9px;
}
dl div {
  display: grid;
  grid-template-columns: minmax(85px, 0.6fr) minmax(0, 1.4fr);
  gap: 10px;
  padding-block: 7px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
li {
  padding-block: 13px;
  border-bottom: 1px solid var(--rule);
  overflow-wrap: anywhere;
}
li p {
  margin: 3px 0;
  color: var(--muted);
}
li .actions {
  margin: 8px 0 0;
}
footer {
  font-size: 0.82rem;
  gap: 16px;
  border-top: 1px solid var(--rule);
  padding-block: 16px;
  color: var(--muted);
}
@media (max-width: 720px) {
  .mast,
  main,
  footer {
    width: min(91%, 520px);
  }
  .mast {
    padding-block: 14px;
  }
  main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-block: 24px;
  }
  .panel {
    order: 0;
    padding: 0;
    max-width: none;
  }
  .portrait {
    order: 1;
    width: 100%;
  }
  .picture {
    height: 175px;
    border-radius: 28px 28px 5px 5px;
  }
  .picture img {
    object-position: center 43%;
  }
  .story {
    bottom: 15px;
  }
  .story h2 {
    font-size: 1.8rem;
    margin: 2px 0;
  }
  .story p {
    font-size: 0.85rem;
  }
  .credit {
    font-size: 0.71rem;
  }
}

.market-nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(8px,2vw,22px); }
.market-nav a { font-weight: 600; text-underline-offset: 4px; }
@media (max-width: 430px) { .mast { flex-wrap: wrap; gap: 8px; } }

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
}
#account-main.dashboard { display: block; }
.dashboard .panel { max-width: none; padding: 0; }
.dashboard .title-row h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.dashboard #subtitle { font-size: 1.15rem; overflow-wrap: anywhere; }
.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr));
  gap: 14px;
  margin: 20px 0 32px;
}
.dashboard-action {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px;
  padding-inline-end: 48px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.dashboard-action strong { font-size: 1.17rem; }
.dashboard-action span { color: var(--muted); }
.dashboard-action::after {
  content: "";
  position: absolute;
  inset-inline-end: 20px;
  top: 28px;
  width: 8px;
  height: 8px;
  border-block-start: 2px solid;
  border-inline-end: 2px solid;
  transform: rotate(45deg);
}
[dir="rtl"] .dashboard-action::after { transform: rotate(-45deg); }
.dashboard-action:hover { border-color: var(--brand); background: var(--lavender); }
.dashboard-action:is(#manage-products, #review-stores) { background: var(--brand); color: white; }
.dashboard-action:is(#manage-products, #review-stores) span { color: #eef8ff; }
.dashboard-action:is(#manage-products, #review-stores):hover { background: var(--navy-dark); }
.dashboard #member > section { max-width: 760px; scroll-margin-top: 20px; }
.dashboard dl { margin-top: 8px; }
@media (max-width: 720px) {
  .dashboard-actions { grid-template-columns: 1fr; gap: 10px; }
  .dashboard-action { padding-block: 14px; }
  .dashboard-action::after { top: 22px; }
}

.primary, .dashboard-action:is(#manage-products,#review-stores) {
  background: linear-gradient(110deg,var(--brand),var(--dashboard-blue));
}
.mast { border-block-end: 2px solid transparent; border-image: linear-gradient(90deg,var(--brand),var(--cyan)) 1; }
.account-tabs { display:flex; flex-wrap:wrap; gap:.4rem; margin-block:1rem; }
.account-tabs a { text-decoration:none; padding:.45rem .8rem; border-radius:8px; color:var(--navy); }
.account-tabs a[aria-current] { background:var(--lavender); box-shadow:inset 0 -2px var(--violet); font-weight:700; }
.password-rules { margin-block:.3rem; }
.password-rules li { padding:.15rem 0; border:0; color:var(--muted); font-size:.88rem; }
.password-rules [data-met="true"] { color:var(--dashboard-blue); font-weight:650; }
.security-main { display:block; min-height:65vh; }
.security-panel { max-width:32rem; margin-inline:auto; background:var(--surface); padding:clamp(1rem,4vw,2.4rem); border:1px solid var(--rule); border-radius:14px; }
.security-panel h1 { margin-block:.6rem; color:var(--navy); line-height:1.2; }
.security-panel #intro { color:var(--muted); }

.method-list { display:grid; gap:.5rem; margin-block:1.2rem; }
.method-list label { display:flex; align-items:center; gap:.65rem; padding:.7rem; border:1px solid var(--rule); border-radius:8px; }
.method-list label:has(input:checked) { background:var(--lavender); border-color:var(--violet); }
.method-list small { margin:0; margin-inline-start:auto; }
#pairing { margin-block:1rem; text-align:center; }
#pair-qr { display:block; width:min(240px,100%); height:auto; margin:0 auto .65rem; image-rendering:pixelated; }
#manual-key { display:block; overflow-wrap:anywhere; padding:.6rem; }
#backup-kit { margin-block:1rem; }
#backup-list { display:grid; gap:.4rem; margin-block:.8rem; font-family:monospace; }
#backup-list li { padding:.3rem; }
#alternative-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
#alternative-actions:not(:has(> button:not([hidden]))) { display:none; }
#app-action { padding:.65rem; color:var(--ink); background:var(--surface); border:1px solid var(--border); border-radius:7px; font:inherit; }
