/* =============================================================
   TraceRecord — tr-shell.css
   THE shared shell: one Concept 7 application banner and one
   footer (the landing footer), identical on every page.
   Self-contained: no dependency on page-specific stylesheets.
   ============================================================= */
:root {
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sh-deep: #0f1b2d;
  --sh-navy: #182c46;
  --sh-teal: #3c6081;
  --sh-cream: #f6f3ea;
  --sh-amber: #b7791f;
  --sh-green: #2f6a4f;
}

/* ---------------- Concept 7 application banner ---------------- */
/* Floating application banner: a detached instrument bar, not a page edge.
   The shell is transparent; the row itself is the object that floats. */
.tr-banner { background: transparent; color: #e8eef4; position: sticky; top: 0; z-index: 50; padding: 12px 0 0; }
.tr-banner-row { width: min(1280px, calc(100% - 40px)); margin: 0 auto; display: flex; align-items: center; gap: 18px;
  min-height: 60px; padding: 0 10px 0 18px; border-radius: 16px;
  background: color-mix(in srgb, var(--sh-deep) 88%, transparent);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 14px 34px rgba(15, 27, 45, .22);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  transition: box-shadow .25s ease, background .25s ease;
  overflow: hidden; /* field clip */ }
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .tr-banner-row { background: rgba(15, 27, 45, .93); }
}
.tr-banner-logo { display: inline-flex; align-items: center; flex: none; min-height: 44px; }
.tr-banner-logo img { height: 34px; width: auto; display: block; }
.tr-banner-nav { display: flex; gap: 2px; }
.tr-banner-nav a { position: relative; transition: color .18s ease, background .18s ease; }
.tr-banner-nav a { display: inline-flex; align-items: center; gap: 8px; color: #c8d2dd; text-decoration: none; font-weight: 700; font-size: .95rem; padding: 10px 14px; min-height: 44px; border-radius: 10px; white-space: nowrap; }
.tr-banner-nav a .tr-icon { width: 18px; height: 18px; }
.tr-banner-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.tr-banner-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .13); box-shadow: 0 1px 0 rgba(255,255,255,.10) inset; }
.tr-banner-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--sh-amber); }
.tr-banner-side { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tr-banner-quiet { color: #9fb6cc; text-decoration: none; font-size: .88rem; padding: 10px 8px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 10px; white-space: nowrap; }
.tr-banner-quiet:hover { color: #fff; }
.tr-banner-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 10px; background: var(--sh-cream); color: var(--sh-navy); text-decoration: none; font-weight: 800; font-size: .92rem; white-space: nowrap; }
.tr-banner-cta .tr-icon { width: 18px; height: 18px; }
.tr-banner-cta:hover { background: #fff; color: var(--sh-navy); transform: translateY(-1px); }
.tr-banner-cta { transition: background .18s ease, transform .18s ease; }
.tr-banner a:focus-visible { outline: 3px solid var(--sh-amber); outline-offset: 2px; }
/* Semantic trace edge under the banner: source → run → registration → boundary → output (Concept 1 grammar) */
.tr-banner-edge { display: flex; height: 3px; width: min(1180px, calc(100% - 92px)); margin: -1px auto 0; border-radius: 0 0 999px 999px; overflow: hidden; opacity: .95; position: relative; z-index: 49; }
.tr-banner-edge i { display: block; height: 100%; }
.tr-banner-edge .te-source { width: 8%; background: var(--sh-teal); }
.tr-banner-edge .te-run { flex: 1; background: linear-gradient(90deg, var(--sh-teal), var(--sh-green)); }
.tr-banner-edge .te-tick { width: 6%; background: var(--sh-green); }
.tr-banner-edge .te-boundary { width: 14%; background: repeating-linear-gradient(90deg, var(--sh-amber) 0 10px, transparent 10px 18px); }
.tr-banner-edge .te-output { width: 12%; background: var(--sh-cream); }
@media (max-width: 1100px) {
  .tr-banner-quiet { display: none; }
}
@media (max-width: 960px) {
  .tr-banner-row { flex-wrap: wrap; padding: 10px 0; gap: 8px 14px; }
  .tr-banner-side { margin-left: auto; }
  .tr-banner-nav { order: 3; width: 100%; overflow-x: auto; }
}

/* ---------------- shared footer (landing footer) ---------------- */
.lp-footer { background: var(--sh-deep); color: rgba(246, 243, 234, .82); margin-top: 0; }
.lp-footer a { color: rgba(246, 243, 234, .82); }
.lp-footer a:hover { color: #fff; }
.lp-footer-trace { height: 4px; background: repeating-linear-gradient(90deg, var(--sh-amber) 0 10px, transparent 10px 18px); opacity: .6; }
.lp-footer .lp-shell { width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: clamp(36px, 5vw, 56px) 0 24px; }
.lp-footer-callout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center; border: 1px solid rgba(246, 243, 234, .16); border-radius: 18px; padding: clamp(20px, 3vw, 32px); margin-bottom: 36px; background: rgba(255, 255, 255, .03); }
.lp-footer-kicker { display: flex; gap: 8px; align-items: center; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9fb6cc; margin: 0 0 8px; }
.lp-footer-kicker svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.lp-footer-callout h2 { font-family: "Source Serif 4", Georgia, serif; font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--sh-cream); margin: 0 0 8px; }
.lp-footer-callout p { margin: 0; font-size: .95rem; }
.lp-footer-actions { display: grid; gap: 10px; justify-items: stretch; }
.lp-footer a.lp-footer-cta { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px; border-radius: 10px; border: 1.5px solid rgba(246, 243, 234, .35); color: var(--sh-cream); text-decoration: none; font-weight: 800; font-size: .95rem; }
.lp-footer-cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.lp-footer-cta svg:last-child { margin-left: auto; }
.lp-footer a.lp-footer-cta:hover { border-color: var(--sh-cream); color: #fff; }
.lp-footer a.lp-footer-cta--primary { background: var(--sh-cream); color: var(--sh-deep); border-color: transparent; }
.lp-footer a.lp-footer-cta--primary:hover { background: #fff; color: var(--sh-deep); }
.lp-footer-grid { display: grid; grid-template-columns: minmax(260px, 1.2fr) repeat(3, minmax(150px, .8fr)); gap: 30px; margin-bottom: 30px; }
.lp-footer-logo { display: inline-block; }
.lp-footer-logo img { max-width: 250px; height: auto; }
.lp-footer-brand p { font-size: .92rem; line-height: 1.6; max-width: 44ch; }
.lp-footer-assurances { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.lp-footer-assurances li { display: flex; gap: 9px; align-items: center; font-size: .86rem; }
.lp-footer-assurances svg { width: 17px; height: 17px; fill: none; stroke: currentColor; color: #9fb6cc; flex: none; }
.lp-footer-col { display: grid; gap: 4px; align-content: start; }
.lp-footer-col h2 { display: flex; gap: 8px; align-items: center; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9fb6cc; margin: 0 0 8px; }
.lp-footer-heading-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; }
.lp-footer-col a { display: flex; gap: 9px; align-items: center; text-decoration: none; font-size: .92rem; min-height: 34px; }
.lp-footer-link-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; opacity: .7; flex: none; }
.lp-footer-bottom { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; border-top: 1px solid rgba(246, 243, 234, .14); padding-top: 18px; font-size: .85rem; }
.lp-footer-release { display: inline-flex; gap: 8px; align-items: center; color: #9fb6cc; }
.lp-footer-release svg { width: 16px; height: 16px; fill: none; stroke: currentColor; flex: none; }
.lp-footer-top { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; font-weight: 700; min-height: 44px; }
.lp-footer-top svg { width: 15px; height: 15px; fill: none; stroke: currentColor; transform: rotate(180deg); }
.lp-footer a:focus-visible { outline: 3px solid var(--sh-amber); outline-offset: 2px; }
@media (max-width: 1080px) { .lp-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 880px) { .lp-footer-callout { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .lp-footer-grid { grid-template-columns: 1fr; } .lp-footer-bottom { flex-direction: column; align-items: flex-start; } .lp-footer-top { margin-left: 0; } }

/* icon sizing safety for pages without tr-icons.css */
.tr-banner .tr-icon, .lp-footer .tr-icon { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }


/* ---------------- inline animated logo (SVG files are sanitized; animation lives here) ---------------- */
.tr-logo-svg { display: block; color: var(--sh-cream); }
.tr-logo-svg--banner { height: 38px; width: auto; }
.tr-logo-svg--footer { height: 44px; width: auto; max-width: 250px; }
.tr-logo-svg .tr-d { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trDraw .55s cubic-bezier(.4, 0, .2, 1) forwards; }
.tr-logo-svg .tr-b { animation-duration: .45s; }
.tr-logo-svg .tr-node { animation-delay: .15s; }
.tr-logo-svg .tr-path { animation-delay: .3s; }
.tr-logo-svg .tr-drop { animation-delay: .55s; }
.tr-logo-svg .tr-l1 { animation-delay: .7s; }
.tr-logo-svg .tr-l2 { animation-delay: .82s; }
.tr-logo-svg .tr-l3 { animation-delay: .94s; }
.tr-logo-svg .tr-dot { opacity: 0; transform-origin: 60.5px 36px; animation: trPop .4s cubic-bezier(.2, .8, .3, 1.2) .62s forwards; }
.tr-logo-svg .tr-word { opacity: 0; animation: trFade .5s ease .5s forwards; }
.tr-logo-svg .tr-tag { opacity: 0; animation: trFade .5s ease .85s forwards; }
/* hover: the trace re-emphasises — dot pulses once */
.tr-banner-logo:hover .tr-dot { animation: trPop .4s cubic-bezier(.2, .8, .3, 1.2) forwards; }
@keyframes trDraw { to { stroke-dashoffset: 0; } }
@keyframes trPop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes trFade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .tr-logo-svg .tr-d { animation: none; stroke-dashoffset: 0; }
  .tr-logo-svg .tr-dot, .tr-logo-svg .tr-word, .tr-logo-svg .tr-tag { animation: none; opacity: 1; }
}

/* hidden attribute must always win over class display values */
[hidden] { display: none !important; }

/* banner condenses slightly once the page is scrolled */
.tr-banner.is-stuck .tr-banner-row { box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 18px 40px rgba(15, 27, 45, .30); background: color-mix(in srgb, var(--sh-deep) 95%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .tr-banner-row, .tr-banner-cta, .tr-banner-nav a { transition: none; }
  .tr-banner-cta:hover { transform: none; }
}
@media (max-width: 960px) {
  .tr-banner { padding-top: 8px; }
  .tr-banner-row { border-radius: 14px; padding: 8px 10px 8px 14px; }
  .tr-banner-edge { width: calc(100% - 60px); }
}


/* ============================================================
   Drawing-grid ground — every page that is not the condensed
   landing. Same 28px survey grid, declared on the body classes
   these pages actually use, so the ruling is continuous across
   the site rather than a landing-page-only treatment.
   ============================================================ */
body.legal-page,body.tools-page,body.utility-page,body.desk-page,
body.wsv4-page,body.not-found-page,body.public-shell{
  background-color:#f6f3ea;
  background-image:linear-gradient(rgba(24,44,70,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(24,44,70,.045) 1px,transparent 1px);
  background-size:28px 28px;
}
/* Bands on those pages rule too, so a section with its own tone keeps
   the ground rather than punching a flat hole in it. */
.legal-section,.tr-section,.u-desk-intro,.ws-section,.wsv4-shell{
  background-image:linear-gradient(rgba(24,44,70,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(24,44,70,.04) 1px,transparent 1px);
  background-size:28px 28px;
}
/* Paper sits ON the grid and stays clean. */
/* The footer is a full-width band on every page, so it rules like one.
   Declared here because tr-shell.css owns `.lp-footer{background:…}`, and a
   background shorthand earlier in this sheet would otherwise reset it. */
.lp-footer{
  background-image:linear-gradient(rgba(246,243,234,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(246,243,234,.05) 1px,transparent 1px);
  background-size:28px 28px;
}
.u-app,.u-row-card,.u-recpanel,.u-recdiff,.u-output,.u-pick,
.wsv4-obj,.wsv4-card,.ws-identity,.tr-banner,.legal-card,
.cl-card,.cl-document,.cl-panel,
.lp-footer-trace,.lp-footer-callout,.lp-footer a.lp-footer-cta--primary{background-image:none}
@media print{
  body.legal-page,body.tools-page,body.utility-page,body.desk-page,
  body.wsv4-page,body.not-found-page,body.public-shell,.lp-footer{background-image:none}
}
