/* Frofolia — app styles (navigation, home, form, template picker, preview, manage).
   Portfolio template styles live in templates.css. */
:root {
  --ivory: #F7F3E9; --forest: #173D30; --forest-2: #0F2B21; --char: #252820; --sage: #A8B6A0;
  --terra: #C5684D; --terra-d: #A24A31; --cream: #FFFCF5; --line: #DED8CA; --mut: #5C6357;
  --edge: #8F9684;          /* input borders: 3:1 against the page for accessibility */
  --err: #A32A1B;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --navh: 64px;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--navh) + 16px); }
body { margin: 0; background: var(--ivory); color: var(--char); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; letter-spacing: -.01em; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--forest); color: var(--cream); padding: 10px 16px; z-index: 100; border-radius: 4px; }
.skip:focus { top: 12px; outline-color: var(--cream); }
svg.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--mut); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- navigation ---------- */
#nav-wrap { position: sticky; top: 0; z-index: 30; background: rgba(247,243,233,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
#nav { max-width: 1200px; margin: 0 auto; padding: 12px max(20px, 3vw); display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 25px var(--serif); letter-spacing: -.01em; margin-right: auto; color: var(--forest); }
.brand svg { width: 28px; height: 28px; }
.links { display: flex; gap: 4px; }
.links a { padding: 8px 12px; text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--mut); border-bottom: 2px solid transparent; }
.links a:hover { color: var(--char); }
.links a[aria-current="page"] { color: var(--forest); border-bottom-color: var(--terra); font-weight: 600; }
.pill { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--cream); color: var(--mut); }
.pill b { width: 8px; height: 8px; border-radius: 50%; background: #B58A2B; }
.pill.ok b { background: #2E7D5B; } .pill.bad b { background: var(--err); }
.pill.bad { color: var(--err); border-color: #D9A79F; }
@media (max-width: 720px) {
  #nav { padding: 10px 16px 0; }
  .links { order: 3; flex-basis: 100%; justify-content: space-between; margin: 0 -8px; }
  .links a { padding: 10px 8px; font-size: 14px; }
  .pill span { display: none; } .pill { padding: 8px; }
  .brand { font-size: 22px; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; min-height: 44px; border-radius: 6px; border: 1px solid var(--forest); background: transparent; color: var(--forest); font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; transition: background .18s, color .18s, border-color .18s; }
.btn:hover { background: rgba(23,61,48,.07); }
.btn-primary { background: var(--forest); color: var(--cream); }
.btn-primary:hover { background: var(--forest-2); }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover { background: #82200F; }
.btn-ghost { border-color: var(--edge); color: var(--char); }
.btn-sm { padding: 8px 14px; min-height: 38px; font-size: 13.5px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.link-btn { background: none; border: 0; padding: 4px 6px; cursor: pointer; color: var(--forest); font-weight: 600; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--err); }

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 40px max(20px, 3vw) 88px; outline: 0; }
main:focus, main:focus-visible { outline: 0; }
main.home { max-width: none; padding: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 max(20px, 3vw); }

/* ---------- page headers ---------- */
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.phead h1 { font-size: clamp(30px, 4.4vw, 44px); }
.phead p { margin-top: 8px; color: var(--mut); max-width: 60ch; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- home ---------- */
.hero { max-width: 1200px; margin: 0 auto; padding: 64px max(20px, 3vw) 72px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6.4vw, 80px); line-height: 1.02; letter-spacing: -.02em; color: var(--forest); }
.hero p { margin: 24px 0 34px; font-size: 18.5px; color: #3F443A; max-width: 46ch; line-height: 1.7; }
.hero-art { border: 1px solid var(--line); background: #EDE6D3; line-height: 0; }
.hero-art svg { width: 100%; height: auto; display: block; }
.sect { padding: 72px 0; }
.sect + .sect { border-top: 1px solid var(--line); }
.sect-head { max-width: 640px; margin-bottom: 40px; }
.sect-head h2 { font-size: clamp(30px, 4vw, 44px); }
.sect-head p { margin-top: 12px; color: var(--mut); }
.tgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.tcard { display: flex; flex-direction: column; background: var(--cream); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.thumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: 0; cursor: pointer; text-align: left; }
.thumb .sc { width: 1000px; transform-origin: 0 0; pointer-events: none; }
.tcard .tbody { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tcard h3 { font-size: 24px; }
.tcard .tbody p { color: var(--mut); font-size: 15px; }
.tcard .actions { margin-top: auto; padding-top: 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--char); }
.steps li { padding: 28px 28px 8px 0; margin-right: 28px; border-right: 1px solid var(--line); }
.steps li:last-child { border-right: 0; margin-right: 0; }
.steps .n { font: 400 italic 44px/1 var(--serif); color: var(--terra); display: block; margin-bottom: 16px; }
.steps h3 { font-size: 21px; margin-bottom: 8px; }
.steps p { color: var(--mut); font-size: 15px; }
footer#foot { background: var(--forest); color: #DCE5D6; margin-top: auto; }
.foot-in { max-width: 1200px; margin: 0 auto; padding: 56px max(20px, 3vw) 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot-in .mark { font: 700 25px var(--serif); letter-spacing: -.01em; color: var(--cream); display: flex; gap: 10px; align-items: center; text-decoration: none; width: fit-content; }
.foot-in .mark svg { width: 28px; height: 28px; }
@media (max-width: 720px) { .foot-in .mark { font-size: 22px; } }
.foot-in p { margin-top: 12px; max-width: 34ch; font-size: 15px; }
.foot-in h2 { font: 600 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sage); margin-bottom: 12px; }
.foot-in ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-in a, .foot-in button { color: #EEF3EA; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; font-size: 15px; text-align: left; }
.foot-in a:hover, .foot-in button:hover { text-decoration: underline; }
.foot-in a.mark:hover { text-decoration: none; }
footer#foot :focus-visible { outline-color: var(--cream); }
.foot-bar { max-width: 1200px; margin: 0 auto; padding: 18px max(20px, 3vw) 28px; border-top: 1px solid rgba(255,252,245,.16); font-size: 13px; color: #AFC0A8; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 36px; }
  .tgrid { grid-template-columns: 1fr; max-width: 520px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(2) { border-right: 0; margin-right: 0; }
  .foot-in { grid-template-columns: 1fr 1fr; } .foot-in > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 24px; } .steps li:last-child { border-bottom: 0; } }

/* ---------- form ---------- */
.fwrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; align-items: start; }
.fnav { position: sticky; top: calc(var(--navh) + 24px); }
.fnav ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.fnav a { display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; font-size: 14.5px; color: var(--mut); }
.fnav a:hover { color: var(--char); }
.fnav a[aria-current="true"] { color: var(--forest); font-weight: 600; border-left-color: var(--terra); }
.fnav .dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--edge); display: grid; place-items: center; color: transparent; flex: none; }
.fnav .dot svg { width: 9px; height: 9px; stroke-width: 3; }
.fnav a.done .dot { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.fsec { padding: 0 0 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--navh) + 70px); }
.fsec:last-of-type { border-bottom: 0; }
.fhead h2 { font-size: 26px; }
.fhead p { color: var(--mut); margin: 6px 0 22px; font-size: 15px; }
.frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.frow .full { grid-column: 1 / -1; }
.fld label, .lbl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.req { color: var(--terra-d); }
input[type=text], input[type=email], input[type=tel], input[type=url], textarea { width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--edge); border-radius: 4px; background: var(--cream); color: var(--char); font: 16px var(--sans); }
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #7B8275; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; border-color: var(--forest); }
[aria-invalid="true"] { border-color: var(--err) !important; background: #FFF6F4; }
.err { color: var(--err); font-size: 13.5px; margin-top: 6px; display: flex; gap: 6px; align-items: flex-start; }
.hint { color: var(--mut); font-size: 13.5px; margin-top: 6px; }
.photo-row { display: flex; gap: 22px; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.avatar { width: 112px; height: 112px; border-radius: 50%; border: 1.5px dashed var(--edge); background: rgba(168,182,160,.25); display: grid; place-items: center; overflow: hidden; color: var(--mut); flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 30px; height: 30px; }
.entry { border: 1px solid var(--line); background: rgba(255,252,245,.6); padding: 18px 18px 20px; margin-bottom: 16px; }
.rhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.rhead span { font: 600 13px var(--sans); color: var(--mut); letter-spacing: .06em; text-transform: uppercase; }
.pimg { display: flex; gap: 16px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.pimg-prev { width: 120px; aspect-ratio: 16 / 10; border: 1px dashed var(--edge); background: rgba(168,182,160,.2); display: grid; place-items: center; overflow: hidden; color: var(--mut); }
.pimg-prev img { width: 100%; height: 100%; object-fit: cover; }
.skill-add { display: flex; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 99px; background: rgba(168,182,160,.3); border: 1px solid rgba(23,61,48,.25); color: var(--forest); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip:hover { background: rgba(163,42,27,.1); border-color: var(--err); color: var(--err); }
.chip svg { width: 14px; height: 14px; }
.fbar { position: static; border-top: 1px solid var(--char); padding: 20px 0 12px; margin-top: 32px; }
.fbar .alert { margin: 0 0 10px; }
.fbtns { display: flex; justify-content: space-between; gap: 12px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border: 1px solid #D9A79F; background: #FFF1EE; color: var(--err); font-size: 14.5px; margin: 0 0 14px; }
.alert[hidden] { display: none; }
.note { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; border: 1px solid var(--line); background: var(--cream); padding: 10px 16px; margin-bottom: 24px; font-size: 14.5px; }
@media (max-width: 860px) {
  .fwrap { grid-template-columns: 1fr; gap: 0; }
  .fnav { position: sticky; top: var(--navh); z-index: 8; background: var(--ivory); margin: -8px -20px 24px; padding: 8px 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .fnav ol { display: flex; border-left: 0; width: max-content; }
  .fnav a { border-left: 0; border-bottom: 2px solid transparent; padding: 8px 12px; margin: 0; white-space: nowrap; }
  .fnav a[aria-current="true"] { border-bottom-color: var(--terra); }
  .frow { grid-template-columns: 1fr; }
}

/* ---------- template picker ---------- */
.tpick { position: relative; }
.tpick .tcard { cursor: pointer; transition: border-color .18s, box-shadow .18s; }
.tpick .tcard:hover { border-color: var(--forest); }
.tpick .tcard:has(input:checked) { border-color: var(--forest); box-shadow: 0 0 0 2px var(--forest); }
.tpick .tcard:has(input:focus-visible) { outline: 3px solid var(--terra); outline-offset: 4px; }
.selmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; color: var(--mut); cursor: pointer; }
.selmark::before { content: ''; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--edge); flex: none; }
.selmark .on { display: none; }
.tpick .tcard:has(input:checked) .selmark { color: var(--forest); }
.tpick .tcard:has(input:checked) .selmark .on { display: inline; }
.tpick .tcard:has(input:checked) .selmark .off { display: none; }
.tpick .tcard:has(input:checked) .selmark::before { background: var(--forest) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><path d='m5 12 5 5 9-10'/></svg>") center / 12px no-repeat; border-color: var(--forest); }
.tpick-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- preview ---------- */
.tabs { display: inline-flex; border: 1px solid var(--forest); border-radius: 6px; overflow: hidden; }
.tabs button { border: 0; background: transparent; color: var(--forest); padding: 9px 16px; min-height: 40px; font-weight: 600; font-size: 14px; cursor: pointer; }
.tabs button + button { border-left: 1px solid var(--forest); }
.tabs button[aria-pressed="true"] { background: var(--forest); color: var(--cream); }
.tabs button:focus-visible { outline-offset: -4px; outline-color: var(--terra); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--line); background: var(--cream); border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--forest); }
.stage { border: 1px solid var(--line); background: #fff; overflow: hidden; }
.stage .tplw:has(.t1), .pdlg-body .tplw:has(.t1) { background: var(--cream); }

/* ---------- manage ---------- */
.mlist { list-style: none; margin: 0; padding: 0; }
.mrow { display: grid; grid-template-columns: 56px minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.mav { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: rgba(168,182,160,.4); display: grid; place-items: center; font: 600 22px var(--serif); color: var(--forest); }
.mav img { width: 100%; height: 100%; object-fit: cover; }
.mmain h2 { font-size: 21px; overflow-wrap: anywhere; }
.mmain p { color: var(--mut); font-size: 14.5px; overflow-wrap: anywhere; }
.mmeta { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font-size: 13.5px; color: var(--mut); }
.macts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 900px) {
  .mrow { grid-template-columns: 56px minmax(0, 1fr); }
  .mmeta { grid-column: 2; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
  .macts { grid-column: 1 / -1; justify-content: flex-start; }
}
.panel { border: 1px solid var(--line); background: var(--cream); padding: 48px 28px; text-align: center; }
.panel h2 { font-size: 26px; margin-bottom: 8px; }
.panel p { color: var(--mut); max-width: 52ch; margin: 0 auto 20px; }
.panel .errtxt { color: var(--err); font-size: 14px; word-break: break-word; }
.skel { height: 96px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, transparent, rgba(168,182,160,.25), transparent) 0 0 / 200% 100%; animation: sh 1.4s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------- dialogs + toast ---------- */
dialog { border: 1px solid var(--char); border-radius: 6px; padding: 0; background: var(--cream); color: var(--char); max-width: calc(100vw - 24px); }
dialog::backdrop { background: rgba(23,35,30,.55); }
.dlg { width: 440px; padding: 28px; }
.dlg h2 { font-size: 24px; margin-bottom: 10px; }
.dlg p { color: var(--mut); margin-bottom: 22px; }
.dact { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.pdlg { width: min(1060px, calc(100vw - 24px)); height: min(90vh, 1000px); display: flex; flex-direction: column; }
.pdlg[open] { display: flex; }
.pdlg-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.pdlg-head h2 { font-size: 22px; } .pdlg-head p { font-size: 14px; color: var(--mut); }
.pdlg-body { overflow: auto; flex: 1; background: #fff; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--forest); color: var(--cream); padding: 12px 20px; border-radius: 6px; font-weight: 600; font-size: 14.5px; transition: .25s; z-index: 80; display: flex; gap: 8px; align-items: center; max-width: calc(100vw - 32px); border: 1px solid rgba(255,252,245,.45); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.err { background: var(--err); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- print: only the portfolio ---------- */
@page { margin: 8mm; }
@media print {
  body { background: #fff; display: block; }
  #nav-wrap, footer#foot, .phead, .toast, .skip { display: none !important; }
  main { padding: 0; max-width: none; }
  .stage { border: 0; }
}

/* Home hero photo: chamfered (octagon) frame with a sage block and an outline accent.
   The box keeps the same proportions as the old illustration (520:560), so the text beside it sits exactly where it did. */
.hero-art { position: relative; border: 0; background: none; line-height: 0; aspect-ratio: 520 / 560; box-sizing: border-box; padding: 0 15% 5% 0; }
.hero-art::before { content: ''; position: absolute; right: 0; top: 12%; width: 18%; height: 58%; background: var(--sage, #A8B6A0); border-radius: 12px; z-index: 0; }
.hero-art::after { content: ''; position: absolute; right: 3%; bottom: 0; width: 26%; height: 18%; border-right: 1.5px solid var(--forest, #173D30); border-bottom: 1.5px solid var(--forest, #173D30); border-radius: 0 0 4px 0; z-index: 0; opacity: .75; }
.hero-shape { position: relative; z-index: 1; width: 100%; height: 100%; clip-path: polygon(24% 0, 74% 0, 100% 17%, 100% 83%, 80% 100%, 20% 100%, 0 83%, 0 17%); background: #E9E4D6; }
.hero-shape img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
@media (max-width: 900px) { .hero-art { max-width: 440px; width: 100%; margin: 0 auto; } }
.btn-del:hover, .btn-del:focus-visible { color: var(--err); border-color: var(--err); background: rgba(163,42,27,.08); }

/* ---- account: header, pop-ups (log in / sign up / my account) ---- */
.acct { display: flex; align-items: center; gap: 8px; }
.avatar-btn { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--forest); background: var(--forest); color: var(--cream); font: 700 17px var(--sans); cursor: pointer; display: grid; place-items: center; overflow: hidden; padding: 0; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-btn:hover { background: var(--forest-2, #1F5240); }
.avatar-btn:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }
.foot-in { grid-template-columns: 1fr; }
.tag.draft { background: #F8E9DE; border-color: #E2B9A3; color: #8A3F27; }
input[type=password] { width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--edge); border-radius: 4px; background: var(--cream); color: var(--char); font: 16px var(--sans); }
input[type=password]:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; border-color: var(--forest); }
.pwrap { position: relative; }
.pwrap input { padding-right: 76px; }
.pwtog { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 0 12px; border: 0; background: transparent; color: var(--forest); font: 600 13.5px var(--sans); cursor: pointer; border-radius: 4px; }
.pwtog:hover { background: rgba(23,61,48,.08); }
dialog.authdlg { border: 1px solid var(--line); background: var(--cream); color: var(--char); width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; padding: 32px 30px 26px; border-radius: 10px; box-shadow: 0 24px 70px rgba(23,40,30,.35); position: fixed; margin: auto; }
dialog.authdlg.acc { width: min(520px, calc(100vw - 24px)); }
dialog.authdlg::backdrop { background: rgba(37,40,32,.55); backdrop-filter: blur(2px); }
.authdlg h2 { font-size: 28px; margin: 0 40px 6px 0; }
.authdlg h3 { font: 700 13px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--forest); margin: 0 0 14px; }
.authdlg .sub { color: var(--mut); margin: 0 0 22px; font-size: 15px; }
.authdlg form { display: grid; gap: 16px; }
.authdlg form .btn { width: 100%; }
.authdlg .acc form { }
.authdlg.acc form { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.authdlg.acc form .btn { width: auto; justify-self: start; }
.authdlg .dx { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--ivory, #F7F3E9); color: var(--char); cursor: pointer; display: grid; place-items: center; }
.authdlg .dx:hover { background: #fff; border-color: var(--forest); }
.authdlg .dx svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.authdlg .alert.good { border-color: #A9CDB9; background: #EFF8F2; color: #1F6B47; }
.authdlg .alert { margin: 0; }
.auth-alt { text-align: center; margin: 18px 0 0; color: var(--mut); font-size: 14.5px; }
.acc-top { display: flex; gap: 16px; align-items: center; }
.acc-top strong { display: block; font-size: 17px; }
.acc-top .muted { display: block; font-size: 14px; word-break: break-all; }
.avatar-lg { width: 76px; height: 76px; border-radius: 50%; background: var(--forest); color: var(--cream); font: 700 30px var(--sans); display: grid; place-items: center; overflow: hidden; flex: none; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.acc-foot { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .acct { order: 2; } }

/* ---- generate success banner + workflow buttons ---- */
.banner-ok { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; margin: 0 0 20px; border: 1px solid #A9CDB9; background: #EFF8F2; color: #1F6B47; font-size: 14.5px; }
.banner-ok svg { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.banner-ok a { color: inherit; font-weight: 600; text-underline-offset: 3px; }
.phead .actions { justify-content: flex-end; }
@media (max-width: 720px) { .phead .actions .btn, .tpick-bar .btn { flex: 1 1 auto; } .tpick-bar .actions { width: 100%; } }

/* ---- print / Save as PDF: only the portfolio, on clean A4 pages ---- */
@page { size: A4; margin: 10mm; }
@media print {
  .banner-ok, dialog, .toast { display: none !important; }
  .stage { overflow: visible; background: none; }
  .t1-item, .t2-card, .t2-entry, .t3-work, .t3-ent, .t3-sk li, .t2-tag { break-inside: avoid; page-break-inside: avoid; }
  .t1-head, .t1-pic, .t3-hero, .t3-lab, .t2-sec > h2, .t1-main h2, .t1-side h2 { break-after: avoid; page-break-after: avoid; }
}
