:root {
  --page: #f8f6f1;
  --ink: #203b34;
  --muted: #73776f;
  --line: #dddcd2;
  --green: #173b32;
  --gold: #a58a56;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
  color-scheme: light;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a, input, textarea { outline-offset: 5px; }
:focus-visible { outline: 2px solid var(--gold); }
button:disabled { cursor: default; opacity: .5; }
svg { display: block; width: 24px; height: 24px; flex-shrink: 0; }
[hidden] { display: none !important; }
::selection { background: #c8d6c6; color: var(--green); }

.page-shell { width: min(100%, 460px); margin-inline: auto; padding: clamp(48px, 10svh, 96px) 24px 24px; }
.profile { text-align: center; }
.avatar { position: relative; display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 50%; background: var(--green); color: var(--page); }
.avatar::before { content: ""; position: absolute; inset: 7px; border: 1px solid #a58a5680; border-radius: inherit; }
.avatar > span { font-family: var(--serif); font-size: 34px; letter-spacing: -.07em; }
.avatar > span > span { font-size: 21px; letter-spacing: -.04em; }
.eyebrow { margin: 0; color: #707764; font-size: 9px; font-weight: 600; letter-spacing: .2em; line-height: 1.5; text-transform: uppercase; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
.profile h1 { margin: 0; font-size: 36px; letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
.links { display: grid; grid-auto-rows: 1fr; gap: 14px; margin-top: 34px; }
.link-card { display: grid; grid-template-columns: 24px minmax(0, 1fr) 24px; align-items: center; gap: 16px; width: 100%; min-height: 66px; padding: 18px 22px; border: 1px solid #c6cbbf; border-radius: 12px; background: #fdfcf9; font-size: 15px; font-weight: 500; line-height: 1.5; transition: background .18s, border-color .18s; }
.link-card > span { min-width: 0; overflow-wrap: anywhere; }
.link-icon { width: 23px; height: 23px; }
.link-arrow { width: 16px; height: 16px; justify-self: end; color: var(--gold); }
.link-card[href]:hover { background: #ecf0e6; border-color: var(--green); }
.link-card[aria-disabled="true"] { cursor: default; }
.editor-link { display: flex; width: fit-content; align-items: center; gap: 7px; margin: 32px auto 0; min-height: 44px; color: var(--muted); font-size: 10px; }
.editor-link svg { width: 14px; height: 14px; }
.editor-link:hover { color: var(--ink); }

.primary-button, .secondary-button { display: flex; align-items: center; justify-content: center; gap: 18px; width: 100%; min-height: 50px; padding: 14px 20px; border: 1px solid transparent; border-radius: 2px; font-size: 12px; font-weight: 500; }
.primary-button { background: var(--green); color: #fff; }
.primary-button:not(:disabled):hover { background: #295044; }
.primary-button svg { width: 17px; height: 17px; }
.secondary-button { margin-top: 8px; background: transparent; border-color: var(--line); }
.secondary-button:hover { background: #eeeee5; }
.toast { position: fixed; z-index: 10; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); padding: 14px 22px; margin: 0; background: var(--green); color: #fff; font-size: 12px; text-align: center; border-radius: 3px; box-shadow: 0 5px 25px #173b3220; }

.settings-shell { width: min(100%, 660px); margin-inline: auto; padding: 22px 24px 40px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; color: var(--muted); }
.settings-intro { margin: 30px 0; }
.settings-intro h1 { margin: 14px 0; font-size: clamp(30px, 7vw, 40px); letter-spacing: -.035em; }
.settings-intro > p:last-child { color: var(--muted); line-height: 1.8; font-size: 13px; }
.settings-form { padding: 25px; border: 1px solid var(--line); background: #fcfbf7; border-radius: 3px; }
.field-heading { margin: 30px 0 22px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 9px; font-weight: 600; letter-spacing: .16em; color: #707764; }
.field-heading:first-child { margin-top: 0; padding-top: 0; border: 0; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 500; }
input, textarea { display: block; width: 100%; min-width: 0; padding: 13px 14px; background: var(--page); border: 1px solid #cecec2; border-radius: 2px; font-size: 16px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #858a7c; }
textarea { resize: vertical; }
.field small { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 8px; }
.form-footer .primary-button { width: auto; }
.preview-link { display: flex; align-items: center; min-height: 44px; font-size: 12px; }
.form-status { margin: 18px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.form-status.error { color: #a03226; }
.form-status.success { color: var(--green); }
.settings-note { margin: 20px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

@media (max-width: 359px) {
  .page-shell { padding-inline: 20px; }
  .link-card { padding-inline: 18px; gap: 12px; }
  .settings-shell { padding-inline: 18px; }
  .settings-form { padding: 18px; }
  .form-footer { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .preview-link { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Native, keyboard-accessible switches; hiding a card never erases its link. */
.card-visibility{min-width:0;margin:0;padding:0 0 6px;border:0}
.card-visibility legend{padding:0;font-family:var(--serif);font-size:24px;letter-spacing:-.025em}
.card-visibility>p{margin:10px 0 18px;color:var(--muted);font-size:12px;line-height:1.7}
.visibility-row{position:relative;display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:58px;border-bottom:1px solid var(--line);cursor:pointer;font-size:13px;font-weight:500}
.visibility-row input{position:absolute;width:1px;height:1px;min-width:0;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.visibility-switch{position:relative;display:block;flex:0 0 44px;width:44px;height:26px;border:1px solid #aeb4a8;border-radius:20px;background:#d9ddd4;transition:background .18s,border-color .18s}
.visibility-switch::before{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #173b3226;transition:transform .18s}
.visibility-row input:checked+.visibility-switch{background:var(--green);border-color:var(--green)}
.visibility-row input:checked+.visibility-switch::before{transform:translateX(18px)}
.visibility-row input:focus-visible+.visibility-switch{outline:2px solid var(--gold);outline-offset:4px}
.card-visibility:disabled .visibility-row{opacity:.5;cursor:default}
