/* Compact section introductions
   The landing page keeps its cinematic hero; inner destinations use a shared,
   quieter masthead so their actual content enters the viewport sooner. */
.section-masthead { position:relative; isolation:isolate; overflow:hidden; min-height:238px; display:flex; align-items:center; padding:42px 0; border-bottom:1px solid var(--line); background:linear-gradient(145deg,#1b1815,#121110); }
.section-masthead::before { content:""; position:absolute; z-index:-1; inset:0; pointer-events:none; background:radial-gradient(circle at 14% 22%,rgba(176,139,90,.17),transparent 31%); }
.section-masthead .container { min-width:0; }
.section-masthead h1 { max-width:880px; margin:5px 0 10px; font-size:clamp(2rem,4vw,3.45rem); line-height:1.24; letter-spacing:-.035em; }
.section-masthead .container>p:not(.eyebrow),.section-masthead-copy>p:not(.eyebrow) { max-width:720px; margin:0; color:var(--muted); line-height:1.9; }
.section-masthead .catalog-search { max-width:740px; margin-top:18px; background:transparent; }
.section-masthead-catalog { background:radial-gradient(circle at 86% 70%,rgba(91,65,40,.11),transparent 31%),linear-gradient(145deg,#1b1815,#121110); }
.section-masthead-catalog,.search-page-hero { z-index:30; overflow:visible; }
.section-masthead-editorial { background:linear-gradient(104deg,rgba(176,139,90,.055) 0 1px,transparent 1px 100%),linear-gradient(145deg,#1a1714,#11100f); background-size:64px 100%,auto; }
.section-masthead-editorial h1 { font-family:inherit; max-width:760px; }
.section-masthead-workshop { background-image:linear-gradient(90deg,rgba(18,17,16,.98) 12%,rgba(18,17,16,.79)),image-set(url("../../images/optimized/shop-1200.webp") type("image/webp"),url("../../images/optimized/shop-1200.jpg") type("image/jpeg")); background-position:center 58%; background-size:cover; }
.section-masthead-workshop .container { display:flex; align-items:flex-end; justify-content:space-between; gap:36px; }
.section-masthead-workshop .section-masthead-copy { min-width:0; }
.section-masthead-workshop h1 { max-width:760px; }
.section-masthead-workshop .button { flex:0 0 auto; }
.section-masthead-learning { background:radial-gradient(circle at 84% 16%,rgba(176,139,90,.09),transparent 26%),radial-gradient(circle at 14% 24%,rgba(176,139,90,.17),transparent 31%),linear-gradient(145deg,#1b1714,#11100f); }
.section-masthead-utility { min-height:215px; background:linear-gradient(145deg,#191714,#121110); }
.section-masthead-account { min-height:220px; }
.section-masthead-account .dashboard-head,.section-masthead-account .notification-page-head { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:28px; }
.section-masthead-account .dashboard-head>div:first-child,.section-masthead-account .notification-page-head>div:first-child { min-width:0; }
.section-masthead-account .dashboard-head>div:last-child { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.section-masthead-account .dashboard-head h1,.section-masthead-account .notification-page-head h1 { margin:5px 0 10px; }
.section-masthead-account .dashboard-head p:last-child,.section-masthead-account .notification-page-head p:last-child { max-width:720px; margin:0; color:var(--muted); line-height:1.9; }
.section-masthead-account .dashboard-head h1 { font-size:clamp(1.9rem,3.6vw,3rem); }
.teacher-directory-masthead h1 { max-width:800px; }
.section-masthead + .section { padding-top:clamp(40px,5vw,64px); }

@media (max-width:700px) {
  .section-masthead { overflow:hidden; min-height:auto; margin:8px 12px 0; padding:22px 0; border:1px solid rgba(176,139,90,.14); border-radius:28px; box-shadow:0 20px 70px rgba(0,0,0,.24); }
  .section-masthead h1 { margin:4px 0 8px; font-size:clamp(1.75rem,8.4vw,2.35rem); line-height:1.3; }
  .section-masthead .container>p:not(.eyebrow),.section-masthead-copy>p:not(.eyebrow) { font-size:.85rem; line-height:1.8; }
  .section-masthead .catalog-search { margin-top:14px; }
  .section-masthead-workshop { background-image:linear-gradient(180deg,rgba(18,17,16,.68),rgba(18,17,16,.96)),image-set(url("../../images/optimized/shop-768.webp") type("image/webp"),url("../../images/optimized/shop-768.jpg") type("image/jpeg")); }
  .section-masthead-workshop .container { display:grid; gap:16px; }
  .section-masthead-workshop .button { width:100%; }
  .section-masthead-account .dashboard-head,.section-masthead-account .notification-page-head { grid-template-columns:minmax(0,1fr); align-items:start; gap:16px; }
  .section-masthead-account .dashboard-head>div:last-child { display:flex; flex-wrap:wrap; gap:8px; }
  .section-masthead-account .dashboard-head>div:last-child .button { min-height:42px; }
}

/* Immutable customer invoice / printable receipt */
.invoice-page { padding-top:clamp(24px,4vw,58px); }
.invoice-page-actions { display:flex; justify-content:space-between; gap:12px; margin-bottom:18px; }
.invoice-sheet { overflow:hidden; border:1px solid rgba(176,139,90,.28); border-radius:28px; background:linear-gradient(145deg,rgba(35,30,25,.98),rgba(17,15,13,.99)); box-shadow:0 28px 80px rgba(0,0,0,.25); }
.invoice-head { display:grid; grid-template-columns:minmax(0,1fr) minmax(250px,.55fr); gap:30px; padding:34px; border-bottom:1px solid rgba(176,139,90,.18); }
.invoice-head h1 { margin:5px 0 8px; font-size:clamp(1.8rem,4vw,3.2rem); }
.invoice-head p:last-child { max-width:560px; margin:0; color:var(--muted); }
.invoice-identity,.invoice-parties dl,.invoice-summary dl { margin:0; }
.invoice-identity>div,.invoice-parties dl>div,.invoice-summary dl>div { display:flex; justify-content:space-between; gap:18px; padding:8px 0; border-bottom:1px solid rgba(176,139,90,.1); }
.invoice-identity dt,.invoice-parties dt,.invoice-summary dt { color:var(--muted); font-size:.75rem; }
.invoice-identity dd,.invoice-parties dd,.invoice-summary dd { margin:0; color:var(--text); font-weight:800; text-align:left; overflow-wrap:anywhere; }
.invoice-status { display:inline-flex; padding:4px 10px; border:1px solid rgba(176,139,90,.3); border-radius:999px; color:var(--accent-light); background:rgba(176,139,90,.11); font-size:.7rem; }
.invoice-status.status-voided { color:#c7bbb0; border-color:rgba(199,187,176,.2); background:rgba(199,187,176,.07); }
.invoice-status.status-partially_refunded,.invoice-status.status-refunded { color:#efbd86; border-color:rgba(202,121,72,.25); background:rgba(202,121,72,.08); }
.invoice-alert { display:flex; gap:12px; margin:22px 34px 0; padding:14px 16px; border:1px solid rgba(202,121,72,.25); border-radius:16px; color:#efbd86; background:rgba(202,121,72,.07); }
.invoice-alert .ph { flex:0 0 auto; margin-top:3px; font-size:1.25rem; }
.invoice-alert strong,.invoice-alert p { margin:0; }
.invoice-alert p { margin-top:3px; color:var(--muted); }
.invoice-parties { display:grid; grid-template-columns:1fr 1fr; gap:22px; padding:28px 34px; }
.invoice-parties>div { min-width:0; padding:20px; border:1px solid rgba(176,139,90,.13); border-radius:18px; background:rgba(245,241,234,.025); }
.invoice-parties h2 { margin:5px 0 8px; font-size:1.15rem; }
.invoice-parties p { margin:4px 0; color:var(--muted); overflow-wrap:anywhere; }
.invoice-table-wrap { margin:0 34px; overflow-x:auto; border:1px solid rgba(176,139,90,.16); border-radius:18px; }
.invoice-table { width:100%; min-width:650px; border-collapse:collapse; }
.invoice-table th,.invoice-table td { padding:14px 16px; border-bottom:1px solid rgba(176,139,90,.1); text-align:right; }
.invoice-table th { color:var(--muted); background:rgba(176,139,90,.06); font-size:.72rem; }
.invoice-table td { font-size:.82rem; }
.invoice-table td:first-child { width:42%; }
.invoice-table td small { display:block; margin-top:3px; color:var(--muted); font-size:.62rem; }
.invoice-table tbody tr:last-child td { border-bottom:0; }
.invoice-summary { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,.55fr); gap:35px; align-items:end; padding:30px 34px 36px; }
.invoice-summary>div>p { max-width:520px; margin:0; color:var(--muted); font-size:.72rem; }
.invoice-summary .invoice-grand-total { margin-top:7px; padding-top:13px; border-color:rgba(176,139,90,.35); }
.invoice-grand-total dt,.invoice-grand-total dd { color:var(--accent-light); font-size:.95rem; }
.order-invoice-action { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:18px; padding:18px 20px; border:1px solid rgba(176,139,90,.18); border-radius:18px; background:rgba(176,139,90,.045); }
.order-invoice-action p,.order-invoice-action small { display:block; margin:0; }
.order-invoice-action small { margin-top:4px; color:var(--muted); }
.order-list>a.order-list-receipt {
  width:max-content;
  max-width:calc(100% - 28px);
  min-height:38px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:-4px 14px 10px;
  padding:8px 12px;
  border:1px solid rgba(176,139,90,.2);
  border-radius:13px;
  color:var(--accent-light);
  background:linear-gradient(145deg,rgba(176,139,90,.1),rgba(245,241,234,.025));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
  font-size:.7rem;
  font-weight:850;
  line-height:1.5;
  transition:border-color .2s ease,background .2s ease,color .2s ease;
}
.order-list>a.order-list-receipt .ph { flex:0 0 auto; margin:0; font-size:1rem; }
.order-list>a.order-list-receipt:hover {
  color:#fff;
  border-color:rgba(176,139,90,.48);
  background:linear-gradient(145deg,rgba(176,139,90,.18),rgba(245,241,234,.045));
}

@media (max-width:700px) {
  .invoice-page-actions { position:sticky; z-index:5; top:8px; padding:7px; border:1px solid rgba(176,139,90,.16); border-radius:17px; background:rgba(18,16,14,.92); backdrop-filter:blur(14px); }
  .invoice-page-actions .button { flex:1; padding-inline:10px; font-size:.68rem; }
  .invoice-sheet { border-radius:22px; }
  .invoice-head,.invoice-parties,.invoice-summary { grid-template-columns:1fr; gap:18px; padding:22px 18px; }
  .invoice-alert { margin:18px 18px 0; }
  .invoice-table-wrap { margin:0 18px; }
  .invoice-table { min-width:570px; }
  .invoice-table th,.invoice-table td { padding:12px; }
  .order-invoice-action { align-items:stretch; flex-direction:column; }
  .order-invoice-action .button { width:100%; }
  .order-list>a.order-list-receipt {
    width:100%;
    max-width:100%;
    min-height:42px;
    justify-content:center;
    margin:-2px 0 4px;
    padding:9px 12px;
    border-radius:14px;
    font-size:.72rem;
  }
}

@media print {
  @page { size:A4; margin:12mm; }
  body { color:#17130f !important; background:#fff !important; }
  .site-header,.mobile-tabbar,.site-footer,.invoice-page-actions,.toast-stack { display:none !important; }
  .invoice-page { padding:0 !important; }
  .invoice-page>.container { width:100% !important; max-width:none !important; }
  .invoice-sheet { border:1px solid #b7aa9a; border-radius:0; color:#17130f; background:#fff; box-shadow:none; }
  .invoice-head,.invoice-parties,.invoice-summary { padding:20px; }
  .invoice-head { grid-template-columns:1fr .65fr; }
  .invoice-parties { grid-template-columns:1fr 1fr; }
  .invoice-summary { grid-template-columns:1fr .65fr; }
  .invoice-head p:last-child,.invoice-parties p,.invoice-summary>div>p,.invoice-table td small,.invoice-identity dt,.invoice-parties dt,.invoice-summary dt { color:#665d54 !important; }
  .invoice-parties>div,.invoice-table-wrap { border-color:#cfc6bc; background:#fff; }
  .invoice-table { min-width:0; }
  .invoice-table th { color:#4f473f; background:#f2eee8; }
  .invoice-table th,.invoice-table td,.invoice-identity>div,.invoice-parties dl>div,.invoice-summary dl>div { border-color:#ddd5cc; }
  .invoice-status { color:#5d472c; border-color:#ae8e66; background:#f3eadf; }
}
