/* links.drhoraciosalles.med.br. Same palette and type as the main site (CLAUDE.md §8). */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url(/fonts/newsreader-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url(/fonts/newsreader-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+A720-A7FF; }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url(/fonts/newsreader-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f8f5ea; --card: #fcfaf3; --surf: #efead8;
  --line: #e6e0cc; --line2: #d9d2ba; --bd: #cbc3a8; --bd2: #b5ad90;
  --ink: #1f2628; --ink2: #3d4648; --inkh: #2f3d40; --muted: #5f6a6b;
  --accent: #2f6a6e; --error: #9a3b2e;
  --font: 'Newsreader', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
input, button { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; transition: color .2s, background-color .2s, border-color .2s; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Public page ---------- */
.lp { max-width: 560px; margin: 0 auto; padding: clamp(56px, 10vw, 96px) 20px 48px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar { width: 128px; height: 128px; border-radius: 999px; object-fit: cover; background: var(--surf); border: 1px solid var(--line2); }
.name { margin-top: 28px; font-weight: 300; font-size: clamp(36px, 8vw, 46px); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.subtitle { margin-top: 12px; font-style: italic; color: var(--accent); font-size: 19px; text-wrap: balance; }
.bio { margin-top: 6px; color: var(--muted); font-size: 16px; letter-spacing: 0.04em; text-wrap: pretty; }
.links { width: 100%; margin-top: 40px; display: flex; flex-direction: column; gap: 14px; }
.link { display: flex; align-items: center; justify-content: center; min-height: 60px; padding: 14px 28px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); background: var(--card); font-size: 19px; line-height: 1.3; text-wrap: balance; }
.link:hover { background: var(--ink); color: var(--bg); }
.link-hl { background: var(--ink); color: var(--bg); }
.link-hl:hover { background: var(--inkh); border-color: var(--inkh); }
.foot { margin-top: 56px; font-size: 16px; }
.foot a { color: var(--muted); font-style: italic; border-bottom: 1px solid var(--bd2); }
.foot a:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Shared admin bits ---------- */
.h1 { font-weight: 300; font-size: clamp(32px, 6vw, 44px); line-height: 1.08; letter-spacing: -0.02em; }
.h2 { font-weight: 300; font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; }
.body, .hint { color: var(--ink2); }
.hint { font-size: 16px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 16px; color: var(--muted); letter-spacing: 0.04em; }
.field input, .ed-link-fields input { width: 100%; border: 0; border-bottom: 1px solid var(--bd); background: transparent; padding: 8px 0; font-size: 18px; border-radius: 0; }
.field input:focus, .ed-link-fields input:focus { outline: none; border-color: var(--ink); }
.field input:focus-visible, .ed-link-fields input:focus-visible { box-shadow: 0 2px 0 var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 24px; border-radius: 999px; border: 1px solid transparent; font-size: 17px; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; background: none; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--inkh); color: var(--bg); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-ghost { border-color: var(--bd); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: 16px; }
.textlink { background: none; border: 0; padding: 0; min-height: 44px; font-style: italic; color: var(--ink2); text-decoration: underline; text-decoration-color: var(--bd2); text-underline-offset: 4px; cursor: pointer; font-size: 17px; }
.textlink:hover { color: var(--ink); text-decoration-color: var(--ink); }
.note { padding: 14px 18px; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; color: var(--ink2); font-size: 17px; }
.note-err { color: var(--error); }

.auth { max-width: 440px; margin: 0 auto; padding: clamp(56px, 12vw, 120px) 20px 48px; display: flex; flex-direction: column; gap: 28px; }
.auth .btn { width: 100%; }
.alt { text-align: center; margin-top: -8px; }

/* ---------- Editor ---------- */
.editor { max-width: 760px; margin: 0 auto; padding: 40px 20px 140px; }
.ed-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.ed-actions { display: flex; gap: 10px; }
.ed-section { padding: 36px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.ed-profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 32px; align-items: start; }
.ed-profile > .stack { grid-column: span 2; }
@media (max-width: 520px) { .ed-profile > .stack { grid-column: auto; } }
.ed-avatar { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ed-avatar .btn { cursor: pointer; }
.ed-links { display: flex; flex-direction: column; gap: 12px; }
.ed-link { background: var(--card); border: 1px solid var(--line2); border-radius: 10px; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.ed-link.is-off { background: transparent; border-style: dashed; }
.ed-link.is-off .ed-link-fields input { color: var(--muted); }
.ed-link-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 4px 20px; }
.ed-link-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 16px; color: var(--ink2); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.ed-link-btns { margin-left: auto; display: flex; gap: 6px; }
.mini { min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--bd); border-radius: 999px; background: none; cursor: pointer; font-size: 17px; }
.mini:hover { border-color: var(--ink); }
.mini-del { font-size: 16px; color: var(--error); }
.mini-del:hover { border-color: var(--error); }
#add-link { align-self: flex-start; }
.ed-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 20px; background: rgba(248, 245, 234, 0.94); border-top: 1px solid var(--line); display: flex; justify-content: center; align-items: center; gap: 20px; }
.ed-bar .btn { min-width: 160px; }
.status { font-size: 16px; color: var(--muted); text-align: right; flex: 1; max-width: 520px; }
.status-err { color: var(--error); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Bookmarks mode (links2.*) ---------- */
.bm { max-width: 640px; margin: 0 auto; padding: clamp(40px, 8vw, 80px) 20px 48px; }
.bm-title { font-weight: 300; font-size: clamp(32px, 6vw, 44px); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 24px; }
.bm-list { border-top: 1px solid var(--line2); }
.bm-list li { border-bottom: 1px solid var(--line2); }
.bm-link { display: flex; flex-direction: column; gap: 2px; padding: 14px 4px; min-height: 60px; color: var(--ink); }
.bm-link:hover { background: var(--surf); color: var(--ink); }
.bm-t { font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.bm-u { font-size: 16px; color: var(--muted); overflow-wrap: anywhere; }
.bm-edit { margin-top: 40px; font-size: 16px; }
.bm-edit a { color: var(--muted); font-style: italic; border-bottom: 1px solid var(--bd2); }
.bm-edit a:hover { color: var(--ink); border-color: var(--ink); }
