/* ==========================================================================
   Timothy Hall Photography — bridge for the older PHP pages
   (client galleries, framing consultation, inspiration-wall participant,
   portrait review and supervisor pages).
   Loaded AFTER /assets/thp.css and each page's own stylesheet, so those
   pages use the same light gallery-wall look, fonts, header and footer
   as the rest of the website.
   ========================================================================== */

:root{
  color-scheme:light;
  /* Old stylesheets redefine these names with dark values; put the site's back. */
  --ink:#1c1d1b;
  --paper:#fbfaf6;
  --line:#d9d2c4;
  /* Old variable names, mapped to the 2026 palette */
  --bg:var(--wall);
  --paper-old:var(--wall);
  --muted:var(--ink-2);
  --gold:var(--accent);
  --green:var(--accent);
  --sand:var(--paper);
  --panel:var(--paper);
  --surface:var(--paper);
}

/* Base */
html body{background:var(--wall);color:var(--ink);font:400 16.5px/1.68 var(--sans)}
body h1,body h2,body h3,body h4{font-family:var(--serif);font-weight:400;color:var(--ink)}
body h1 em,body h2 em,body h3 em{color:var(--accent)}
body a:hover{color:var(--accent)}
body .eyebrow{font:500 .72rem/1.5 var(--sans);letter-spacing:.2em;text-transform:uppercase;color:var(--accent)}
body .small,body .muted,body .portal-help,body .photo-guidance,body .style-guidance{color:var(--ink-2)}
body .textlink,body .text-link{color:var(--ink);text-decoration:underline;text-decoration-color:var(--accent-soft);text-underline-offset:3px}

/* Old main/content widths: give the same side margins as the site */
.legacy-page main#main,.legacy-page main.review-shell,.legacy-page main.participant-shell,.legacy-page main.access-shell,.legacy-page .consult-main{
  width:100%;max-width:calc(var(--max) + 2 * var(--gutter));margin:0 auto;padding-left:var(--gutter);padding-right:var(--gutter)}
.legacy-page main .wrap{width:100%;max-width:none;padding-left:0;padding-right:0}
html body .topbar [role=navigation]{display:flex;gap:22px;align-items:center}
html body .topbar a{font-size:inherit;letter-spacing:inherit}
.legacy-page main{padding-top:clamp(36px,5vw,72px);padding-bottom:clamp(56px,7vw,104px)}

/* Panels */
body .form-panel,body .portal-panel,body .project-entry,body .decision-record,body .aside-note,body .notice{
  background:var(--paper);border:1px solid var(--line);color:var(--ink);border-radius:var(--radius)}
body .portal-file,body .supervisor-metrics>*{background:var(--paper);border-color:var(--line);color:var(--ink)}

/* Form fields */
.legacy-page label{color:var(--ink);font-size:.84rem;font-weight:500}
.legacy-page input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]),
.legacy-page select,.legacy-page textarea{
  background:#fff;color:var(--ink);border:1px solid #c9c1b2;border-radius:var(--radius);min-height:50px;padding:12px 14px;font-size:1rem}
.legacy-page textarea{min-height:120px}
.legacy-page input:focus,.legacy-page select:focus,.legacy-page textarea:focus{outline:none;border-color:var(--ink);box-shadow:0 0 0 3px rgba(125,95,44,.18)}
.legacy-page ::placeholder{color:#8b8d86}
.legacy-page input[readonly]{background:var(--tile)}

/* Buttons: old .button / bare buttons look like the site's .btn */
.legacy-page .button,.legacy-page main button:not(.menu-toggle):not(.lightbox__close),.legacy-page main input[type=submit]{
  display:inline-flex;align-items:center;justify-content:center;gap:.6em;min-height:50px;padding:.85em 1.6em;
  border:1px solid var(--ink);background:var(--ink);color:var(--wall);font:500 .9rem/1.2 var(--sans);letter-spacing:.02em;
  border-radius:var(--radius);text-transform:none;cursor:pointer}
.legacy-page .button:hover,.legacy-page main button:not(.menu-toggle):not(.lightbox__close):hover{background:#3a3c38;border-color:#3a3c38;color:var(--wall)}
.legacy-page .button.outline,.legacy-page .button.secondary,.legacy-page main button.secondary,.legacy-page main button.outline,.legacy-page a.secondary{
  background:transparent;color:var(--ink);border:1px solid var(--ink)}
.legacy-page .button.outline:hover,.legacy-page main button.secondary:hover,.legacy-page main button.outline:hover,.legacy-page a.secondary:hover{background:var(--ink);color:var(--wall)}
.legacy-page .button.small{min-height:42px;padding:.6em 1.15em;font-size:.84rem}

/* Messages */
body .error,body .portal-error{color:#7a2418;background:#fbefec;border:1px solid #e3b9b0;border-left:3px solid #a33a2a;padding:12px 16px}
body .saved,body .portal-notice,body [role=status].saved{color:var(--ink);background:var(--paper);border-left:3px solid var(--accent);padding:12px 16px}
body .status-pill{background:var(--tile);color:var(--ink);border:1px solid var(--line)}

/* Lines, quotes, tables */
.legacy-page hr,.legacy-page .review-section,.legacy-page section{border-color:var(--line)}
.legacy-page blockquote{border-left:2px solid var(--accent-soft);color:var(--ink-2)}
.legacy-page table{border-color:var(--line)}
.legacy-page th,.legacy-page td{border-color:var(--line)}
.legacy-page details>summary{color:var(--ink)}

/* Hide the old headers/footers if any page still prints one */
.legacy-page .thp-main-header,.legacy-page body>.utility,.legacy-page>header:not(.site-header){display:none}

/* Framing consultation: old dark panels */
.legacy-page .consult-main fieldset,.legacy-page .consult-main .card,.legacy-page .consult-main .result,.legacy-page .consult-main [class*=panel]{
  background:var(--paper);border-color:var(--line);color:var(--ink)}
.legacy-page .consult-main legend{color:var(--ink);font-family:var(--serif)}

/* --------------------------------------------------------------------------
   Undo the old element-level header/footer/heading rules so the shared site
   header and footer render exactly as on the main pages.
   -------------------------------------------------------------------------- */
html body header.site-header{margin:0;width:auto;height:auto;min-height:0;padding:0;display:block;border-bottom:1px solid var(--line);flex-wrap:nowrap}
html body header.site-header .wrap{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:var(--header-h)}
html body header.site-header .brand img{width:50px;height:50px}
html body header.site-header .main-nav{font-size:inherit}
html body footer.site-footer{display:block;margin:0;width:auto;padding:clamp(64px,8vw,104px) 0 32px;border:0;color:var(--night-ink);font-size:inherit}
html body footer.site-footer p{font:inherit;margin:0 0 1em;color:var(--night-muted)}
html body footer.site-footer a{font-size:inherit;color:inherit}
html body footer.site-footer h2{color:var(--night-ink)}
html body footer.site-footer>div{display:block}
html body .topbar a{color:inherit}
.legacy-page h1{font-size:clamp(2.6rem,5.4vw,5.1rem);letter-spacing:-.015em;line-height:1.08;margin:0 0 .5em}
.legacy-page h2{font-size:clamp(1.6rem,2.6vw,2.4rem);letter-spacing:-.01em;line-height:1.1}
.legacy-page main h3{font-size:clamp(1.25rem,1.6vw,1.5rem)}
.legacy-page label{display:block}
.legacy-page main nav{font-size:inherit}
@media (max-width:980px){html body header.site-header .wrap{min-height:64px}}
html body .topbar .wrap,html body .site-header .wrap,html body .site-footer .wrap{width:100%;max-width:calc(var(--max) + 2 * var(--gutter));margin:0 auto;padding:0 var(--gutter)}
.legacy-page main button.secondary:not(.menu-toggle):not(.lightbox__close),.legacy-page main button.outline:not(.menu-toggle):not(.lightbox__close),.legacy-page main .button.secondary,.legacy-page main .button.outline{background:transparent;color:var(--ink);border:1px solid var(--ink)}
.legacy-page main button.secondary:not(.menu-toggle):not(.lightbox__close):hover,.legacy-page main button.outline:not(.menu-toggle):not(.lightbox__close):hover{background:var(--ink);color:var(--wall)}
html body .site-header .menu-toggle{background:none;color:var(--ink);border:1px solid var(--line);padding:0 16px;min-height:44px;font:inherit;font-size:.88rem;text-transform:none;letter-spacing:normal}
html body .site-header .menu-toggle:hover{background:none;color:var(--ink)}
