/*
  Starhallow Online - classic portal pages (every layout page except home).
  Same design language as home.css: cream paper panels with gold corner frames,
  teal header and buttons, serif type, edge vines. Light scheme only.
*/

body.portal-classic {
  --bg: #f3efe2;
  --card: #fffdf6;
  --ink: #243b3b;
  --ink-2: #4f6168;
  --line: #e3d3ad;
  --accent: #1e6263;
  --accent-ink: #1b5d66;
  --focus: #1e6263;
  --gold: #c8a34f;
  --heading: #153a51;
  color-scheme: light;
  background: radial-gradient(ellipse 70% 45% at 50% 0%, #fbf3dc, transparent 70%), #f3efe2;
  background-attachment: scroll;
  color: var(--ink);
  font: 16px/1.55 "Times New Roman", Georgia, serif;
}
.portal-classic h1,.portal-classic h2,.portal-classic h3 { font-family: "Times New Roman", Georgia, serif; font-weight: 600; color: var(--heading); }
.portal-classic a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.portal-classic a:hover { color: #0f4450; }
.portal-classic :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Header: teal bar, gold rule, overhanging logo, edge vines ---------- */
.portal-classic .site-header { position: relative; z-index: 5; background: radial-gradient(ellipse at 50% -80%, #267885, #073b47 65%); border-bottom: 3px solid var(--gold); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.portal-classic .site-header::before,.portal-classic .site-header::after { content: ""; position: absolute; top: 0; pointer-events: none; z-index: 3; background: no-repeat left top / 100% 100%; }
.portal-classic .header-inner { width: 100%; max-width: 1740px; margin-inline: auto; min-height: 62px; padding: 0 96px 0 88px; gap: 20px; flex-wrap: nowrap; }
.portal-classic .brand { position: relative; z-index: 4; flex: none; width: 200px; height: 62px; display: block; text-decoration: none; }
.portal-classic .brand img { position: absolute; top: 0; left: -30px; width: 205px; height: 117px; max-width: none; object-fit: contain; filter: drop-shadow(0 2px 2px #052a33); }
.portal-classic .brand-name { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.portal-classic .main-nav { flex: 1; margin: 0; gap: 26px; justify-content: flex-start; }
.portal-classic .main-nav a { position: relative; padding: 10px 3px; border: 0; border-radius: 0; background: none; color: #fff8de; font: 400 18px Georgia, serif; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.portal-classic .main-nav a:hover { background: none; color: #ffe6a4; }
.portal-classic .main-nav a[aria-current="page"] { color: #ffe6a4; background: none; border: 0; border-bottom: 2px solid #dfba60; }
.portal-classic .main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: calc(50% - 4px); bottom: -4px; width: 7px; height: 7px; background: #e3bf63; transform: rotate(45deg); }
.portal-classic .nav-actions { margin-inline-start: auto; gap: 8px; flex: none; }
.portal-classic .nav-actions .btn { min-height: 40px; padding: 0 14px; border-radius: 4px; font: 600 15px Georgia, serif; text-decoration: none; transform: none; box-shadow: none; }
.portal-classic .nav-actions .btn-ghost { background: transparent; border: 1px solid #b89a55; color: #fff3d6; }
.portal-classic .nav-actions .btn-ghost:hover,.portal-classic .nav-actions .btn-ghost[aria-current="page"] { border-color: #e3bf63; color: #ffe6a4; background: #ffffff12; }
.portal-classic .nav-actions .btn-primary { background: linear-gradient(#fff4c4, #eac875); border: 1px solid #cbab63; color: #3f381e; }
.portal-classic .nav-actions .btn-primary:hover { background: linear-gradient(#fff8d8, #f0d58c); }
.portal-classic .nav-actions .btn { min-height: 44px; }

/* ---------- Page body ---------- */
.portal-classic main { padding-block: 32px 40px; }
.portal-classic .container { width: min(1120px, 100% - 32px); }
.portal-classic .narrow { width: min(780px, 100% - 32px); }
.portal-classic .auth-wrap { padding: 40px 16px 48px; }

/* Framed cream panels (home .portal-panel look). */
.portal-classic .content-card,.portal-classic .auth-card { position: relative; border: 1px solid #cfad67; border-radius: 10px; background: linear-gradient(120deg, #fffef8, #fcf8ec); box-shadow: inset 0 0 0 3px #fffdf1, inset 0 0 0 4px #eadabc, 0 2px 6px #8b712218; color: var(--ink); }
.portal-classic .content-card::before,.portal-classic .auth-card::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(200,163,79,.7); border-radius: 3px; pointer-events: none; }
.portal-classic .content-card { padding: clamp(22px, 4vw, 40px); margin-block: 24px; }
.portal-classic .auth-card { max-width: 440px; padding: 30px 32px 26px; }
.portal-classic .content-card > h1,.portal-classic .auth-card > h1 { font-size: clamp(28px, 3vw, 36px); margin-bottom: 18px; }
.portal-classic .content-card > h1::after,.portal-classic .auth-card > h1::after { content: "\2726"; display: block; width: 150px; margin-top: 10px; font-size: 13px; line-height: 1; text-align: center; color: #c9a24f; background: linear-gradient(90deg, transparent, #d8bf86 30%, transparent 42%, transparent 58%, #d8bf86 70%, transparent) center / 100% 1px no-repeat; }
.portal-classic .card { border: 1px solid var(--line); border-radius: 8px; background: #fffdf6; box-shadow: inset 0 0 0 3px #fffefa, 0 1px 3px #8b712212; padding: 20px 22px; color: var(--ink); }
.portal-classic .card h2,.portal-classic .content-card h2 { font-size: 21px; margin-bottom: 10px; }
.portal-classic .prose h2 { margin-top: 1.2em; }
.portal-classic p { color: var(--ink); }

/* Forms */
.portal-classic .auth-form { gap: 14px; }
.portal-classic .field label { font: 700 15px "Times New Roman", Georgia, serif; color: #1d3440; }
.portal-classic .field input:not([type="hidden"]) { min-height: 44px; padding: 7px 12px; border: 1px solid #d6cbb2; border-radius: 4px; background: #fffdf8; color: #1f3540; font: 16px Georgia, "Times New Roman", serif; }
.portal-classic .field input::placeholder { color: #7b8784; }
.portal-classic .field input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.portal-classic .field-hint { color: var(--ink-2); font-size: 14.5px; }
.portal-classic .field-error { color: #8f2f22; }
.portal-classic .alert { border-radius: 4px; font-size: 15px; }
.portal-classic .alert-error { background: #fbefea; border-color: #e3b0a5; color: #8f2f22; }
.portal-classic .alert-info { background: #fff6dc; border-color: #e2c784; color: #6b5320; }
.portal-classic .alert-ok { padding: 12px 14px; border: 1px solid #a9cfae; border-radius: 4px; background: #eaf4ea; color: #2f6e3f; font-size: 15px; }

/* Buttons: teal with a gold inner frame (home .portal-button). */
.portal-classic .btn { font-family: "Times New Roman", Georgia, serif; transform: none; }
.portal-classic main .btn-primary,.portal-classic main .btn-ghost { position: relative; min-height: 44px; padding: 0 22px; border-radius: 0; font: 600 17px "Times New Roman", Georgia, serif; text-decoration: none; clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px); }
.portal-classic main .btn-primary { background: linear-gradient(#1a5767, #0a394c); border: 1px solid #d7ae5d; box-shadow: inset 0 0 0 2px #123d4b, inset 0 0 0 3px #d9b96c; color: #fff3d6; }
.portal-classic main .btn-primary:hover { background: linear-gradient(#20667a, #0e4459); box-shadow: inset 0 0 0 2px #123d4b, inset 0 0 0 3px #e7c87d; color: #fff8e6; }
.portal-classic main .btn-ghost { background: linear-gradient(#fffdf6, #f6efdc); border: 1px solid #c9ab69; box-shadow: inset 0 0 0 2px #fffdf6, inset 0 0 0 3px #e6d3a2; color: #174a57; }
.portal-classic main .btn-ghost:hover { border-color: #b8924a; color: #0f3f4b; }
/* Show/Hide sits inside the password input, right-aligned. */
.portal-classic .field input + .pw-toggle { position: relative; z-index: 1; margin: -44px 6px 0 0; height: 32px; min-height: 0; padding: 0 12px; line-height: 1; font-size: 15px; box-shadow: inset 0 0 0 2px #fffdf6; }
.portal-classic .field input[type="password"],.portal-classic .field input:has(+ .pw-toggle) { padding-right: 76px; }
.portal-classic main .btn-outline { min-height: 0; padding: 0; border: 0; background: none; color: var(--accent-ink); font: 600 16px Georgia, "Times New Roman", serif; text-decoration: underline; text-underline-offset: 3px; }
.portal-classic .account-grid .kv dd form .btn { border-radius: 0; font-size: 15.5px; padding: 8px 10px; }

/* Lists, key/value, status, news */
.portal-classic ul.list-clean li,.portal-classic ol.list-clean li { border-bottom-color: #e8ddc4; }
.portal-classic .kv dt { color: #566d69; }
.portal-classic .kv dd { color: var(--ink); }
.portal-classic .pill { border: 1px solid #c9ab69; border-radius: 4px; background: #fffdf6; color: var(--ink); font: 700 15px "Times New Roman", Georgia, serif; }
.portal-classic .pill-online::before { background: #3f7d4f; }
.portal-classic .pill-offline::before { background: #a5473a; }
.portal-classic .meta { color: #5d6f6b; font-size: 14.5px; margin: 2px 0 0; }
.portal-classic .back-link { font-weight: 700; }
.portal-classic .plain-list { padding-left: 1.1em; }

/* ---------- Footer ---------- */
.portal-classic .site-footer { padding-block: 0; border-top: 2px solid #d6b56d; background: linear-gradient(110deg, #083d4e, #075064, #103b49); color: #f2e7c8; font-size: 14px; }
.portal-classic .foot-inner { width: 100%; max-width: 1740px; margin-inline: auto; min-height: 56px; padding: 12px 30px; align-items: center; gap: 6px 24px; }
.portal-classic .site-footer p { color: #f2e7c8; }
.portal-classic .site-footer a { color: #ffe6a4; text-decoration: underline; }
.portal-classic .site-footer a:hover { color: #fff3d6; }

/* ---------- Responsive ---------- */
@media (max-width: 1300px) {
  .portal-classic main { padding-top: 12px; }
  .portal-classic .header-inner { min-height: 86px; padding: 6px 64px; gap: 10px 18px; flex-wrap: wrap; justify-content: center; }
  .portal-classic .brand { width: 150px; height: 86px; }
  .portal-classic .brand img { top: 2px; left: 0; width: 146px; height: 83px; }
  .portal-classic .main-nav { flex: 0 1 auto; justify-content: center; gap: 18px; }
  .portal-classic .main-nav a { font-size: 17px; }
  .portal-classic .nav-actions { margin-inline-start: 0; }
}
@media (max-width: 700px) {
  .portal-classic .foot-inner { flex-direction: column; text-align: center; padding-inline: 16px; }
  .portal-classic .main-nav { order: 2; width: auto; margin: 0; }
  .portal-classic .nav-actions { order: 3; }
}
@media (max-width: 600px) {
  .portal-classic .header-inner { padding: 6px 40px 8px; gap: 2px 10px; }
  .portal-classic .brand { width: 132px; height: 75px; flex-basis: 100%; display: flex; justify-content: center; }
  .portal-classic .brand img { position: static; width: 132px; height: 75px; }
  .portal-classic .main-nav { display: grid; grid-template-columns: repeat(3, minmax(84px, auto)); justify-content: center; justify-items: center; gap: 0 20px; flex-basis: 100%; }
  .portal-classic .main-nav a { font-size: 16px; padding: 10px 2px; }
  .portal-classic .nav-actions { flex-wrap: wrap; justify-content: center; }
  .portal-classic .auth-card { padding: 26px 22px 22px; }
}

.portal-classic .content-card > .card { margin-top: 18px; }
.portal-classic .card > :last-child { margin-bottom: 0; }
.portal-classic .auth-form + p { margin-top: 16px; }
