/* Shared visual language: Imgrid's light workspace and hch.no's type and blue. */
:root {
  color-scheme: light;
  color: #292735;
  background: #f8f8fc;
  --primary: #003fa3;
  --primary-strong: #0055d4;
  --soft: #eef3ff;
  --gold: #003fa3;
  --muted: #777582;
  --line: #e9e8ef;
  --panel: #fff;
}
body { background: linear-gradient(180deg, #003fa306, transparent 280px), #f8f8fc; }
main { width: min(1180px, calc(100% - 48px)); }
header { min-height: 76px; padding: 18px 0; gap: 24px; }
.brand { gap: 10px; font-weight: 750; font-size: 1.65rem; letter-spacing: -1.2px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--primary); color: white; font: 25px Georgia, serif; }
.brand-dot { color: var(--primary); }
.brand-caption { padding-left: 22px; border-color: #dcdbe5; font-size: .875rem; font-weight: 400; letter-spacing: 0; }
.site-nav { display: flex; gap: 8px; }
.site-nav a { text-decoration: none; padding: 7px 10px; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border-radius: 5px; }
.site-nav a:hover { background: var(--soft); color: var(--primary); }
.intro { align-items: center; gap: 40px; padding: 34px 0 30px; }
.eyebrow, .small-label { font-size: .6875rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.eyebrow { color: var(--primary); margin: 0 0 10px; }
h1, h2, h3 { font-family: "Space Grotesk", Inter, "Segoe UI", sans-serif; }
h1 { font-size: clamp(2.5rem, 5vw, 4.2rem); font-weight: 700; letter-spacing: -.05em; line-height: .98; text-transform: uppercase; margin: 0 0 14px; }
h1 span { color: var(--primary); }
.lead { color: #646271; font-size: .9375rem; line-height: 1.6; }
.intro-note { width: 300px; max-width: 300px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff9; }
.intro-note .small-label { font-size: .625rem; }
.intro-note p { margin: 9px 0; font-size: .8125rem; line-height: 1.65; }
.intro-note a { font-size: .75rem; }
.intro-copy { min-width:0; }
.intro-aside { margin:14px 0 0;color:var(--muted);font-size:.75rem;line-height:1.7; }
.intro-aside a { color:var(--primary);text-underline-offset:3px;white-space:nowrap; }
.erhu-illustration { flex:0 1 330px;margin:0;min-width:0;display:flex;align-items:center;gap:12px; }
.erhu-illustration img { display:block;width:230px;max-width:70%;height:210px;object-fit:contain; }
.erhu-illustration figcaption { display:flex;flex-direction:column;gap:7px;color:var(--muted);font-size:.6875rem;line-height:1.5; }
.erhu-illustration .small-label { color:var(--primary);white-space:nowrap;font-size:.625rem; }
.studio { padding: 24px 28px 22px; background: white; border-color: var(--line); border-radius: 10px; box-shadow: 0 8px 32px #28223d0a; }
h2 { margin-top: 5px; font-size: 1.55rem; font-weight: 700; line-height: 1.15; letter-spacing: -.035em; }
button, .file-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 9px 15px; border-color: var(--line); color: #292735; background: white; font-size: .875rem; font-weight: 600; }
button:hover:not(:disabled), .file-button:hover { background: #f7f6fb; border-color: #d7d2e6; }
button:disabled { opacity: .35; }
button.primary { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 2px 3px #003fa320; }
button.primary:hover:not(:disabled) { background: var(--primary-strong); border-color: var(--primary-strong); }
button.quiet { border-color: transparent; color: #686372; }
button.quiet:hover:not(:disabled) { background: var(--soft); color: var(--primary); }
.instrument-meta { padding: 14px 0 19px; font-size: .75rem; }
.sound-choice { display: flex; gap: 12px; align-items: center; margin-top: 18px; font-size: .8125rem; }
.sound-choice label { font-weight: 600; }
.sound-choice>span { color: var(--muted); font-size: .75rem; }
.expression-choice { display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:12px;font-size:.8125rem; }
.expression-choice label {display:flex;align-items:center;gap:8px;font-weight:600;cursor:pointer;}
.expression-choice input {width:16px;height:16px;margin:0;accent-color:var(--primary);}
.expression-choice>span {color:var(--muted);font-size:.75rem;}
.pilot-label {padding:2px 5px;border-radius:4px;background:var(--soft);color:var(--primary);font-size:.625rem;font-weight:500;}
.expression-choice .expression-depth {font-weight:400;margin-left:8px;gap:9px;}
.expression-depth input[type=range] {width:110px;height:auto;}
.expression-depth output {min-width:38px;font-variant-numeric:tabular-nums;color:var(--primary);}
.expression-hint,.comparison-hint {font-size:.75rem;line-height:1.5;color:var(--muted);margin:8px 0 0;}
.comparison-hint {margin:0 0 14px;color:var(--primary);}
#status { color: #386c58; }
#status.error { color: #a33b2a; }
.take-header { padding: 22px 0 15px;gap:14px;flex-wrap:wrap; }
.take-stats {margin-left:auto;gap:14px;}
.playback-clock {display:flex;align-items:baseline;gap:6px;font-family:"Space Grotesk",sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap;font-size:1.15rem;color:#4d485b;}
.playback-clock #duration {font-size:1rem;color:var(--muted);}
.demo-guide {display:flex;flex-wrap:wrap;gap:6px 20px;margin:0 0 12px;color:var(--muted);font-size:.6875rem;line-height:1.6;}
.demo-guide time {color:var(--primary);font-variant-numeric:tabular-nums;margin-right:5px;}
h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.02em; }
#duration { color: #4d485b; font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; }
.roll { height: 190px; background: #fafafd; border-color: var(--line); border-radius: 7px; }
#piano-roll {cursor:crosshair;touch-action:none;}
#piano-roll:focus-visible {outline:3px solid #90afe5;outline-offset:-3px;}
.playback-cursor {position:absolute;top:19px;bottom:0;left:0;width:2px;background:var(--primary);pointer-events:none;will-change:transform;box-shadow:0 0 0 1px #ffffff80;}
.playback-cursor::before {content:"";position:absolute;top:0;left:-4px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:7px solid var(--primary);}
.playback-cursor.recording {background:#b94c3b;}
.playback-cursor.recording::before {border-top-color:#b94c3b;}
.timeline-help {display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;margin-top:8px;font-size:.6875rem;line-height:1.6;color:var(--muted);}
#transport-state {color:var(--primary);font-weight:600;}
[hidden] { display: none !important; }
.transport { margin-top: 16px;flex-wrap:wrap; }
.transport-main {flex:1 1 520px;flex-wrap:wrap;}
#demo {margin-left:auto;}
.record-symbol { margin: 0; background: #b94c3b; }
#record.recording { background: #fff0ed; border-color: #d79285; color: #9f402d; }
.render-status { min-height: 44px; }
progress { accent-color: var(--primary); }
.text-button { min-height: auto; color: var(--primary); font-size: .8125rem; }
.keyboard-heading { margin-top: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.keyboard-heading p { font-size: .8125rem; }
#active-note { color: var(--primary); font-size: .875rem; }
.keyboard { height: 126px; }
.piano-key { min-height: 0; gap: 8px; border-radius: 0 0 5px 5px; }
.piano-key.white { background: linear-gradient(#fff, #f5f5f9); border-color: #d9d7e2; color: #625d6d; box-shadow: 0 2px 2px #29273508; }
.piano-key.black { height: 79px; background: linear-gradient(#4d4958, #292633); border-color: #26232e; color: #d5d1df; box-shadow: 0 3px 4px #29273524; }
.piano-key.white:hover:not(:disabled) { background: #edf2ff; border-color: #b2c4e9; }
.piano-key.black:hover:not(:disabled) { background: #55506a; }
.piano-key.white.pressed { background: #dce8ff; border-color: #8baeea; color: var(--primary); }
.piano-key.black.pressed { background: var(--primary); border-color: #003285; color: white; }
.piano-key .note-label { font-size: .625rem; }
.piano-key .key-label { font-size: .6875rem; }
.connections { margin-top: 10px; }
.select-wrap:after { border-color: #817e8c; }
select { min-height: 38px; border-color: var(--line); background: white; color: #696371; font-size: .8125rem; }
.volume { font-size: .8125rem; }
input[type=range] { width: 110px; accent-color: var(--primary); }
.take-actions { padding: 18px 0 22px; }
.take-actions button, .file-button { background: white; border-color: var(--line); font-size: .8125rem; min-height: 36px; padding: 8px 12px; }
.take-actions>span { font-size: .75rem; }
.about-sound {margin:4px 0 28px;padding:30px 32px;background:#fff;border:1px solid var(--line);border-radius:10px;color:#35333f;}
.about-sound h2 {margin:0 0 24px;font-size:1.8rem;letter-spacing:-.035em;}
.about-layout {display:grid;grid-template-columns:minmax(0,2fr) minmax(230px,1fr);gap:36px;align-items:start;}
.about-copy {max-width:70ch;font-size:1rem;line-height:1.8;}
.about-copy p {margin:0 0 1.15em;}
.about-copy p:first-child {font-size:1.0625rem;line-height:1.8;font-weight:500;color:#292735;}
.about-copy p:last-child {margin-bottom:0;}
.sound-credits {padding:20px;background:#f5f6fb;border:1px solid var(--line);border-radius:7px;color:#514e5c;font-size:.875rem;line-height:1.75;}
.sound-credits h3 {margin:0 0 14px;color:#35333f;}
.sound-credits p {margin:0 0 1em;}
.sound-credits p:last-child {margin-bottom:0;}
.about-sound a {color:var(--primary);text-underline-offset:3px;}
.sound-credits .model-note {padding-top:14px;border-top:1px solid #dedee8;color:#514e5c;}
@media (max-width:900px) {
  .about-layout {grid-template-columns:minmax(0,1fr);gap:26px;}
  .about-copy {max-width:none;}
}
footer { color: #8a8295; font-size: .625rem; font-weight: 600; letter-spacing: .06em; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #90afe5; outline-offset: 3px; }
@media (max-width: 760px) {
  main { width: calc(100% - 28px); }
  .site-nav { gap: 0; }
  .site-nav a { font-size: .625rem; padding: 7px; }
  .intro { padding: 26px 0; gap: 24px; }
  .intro-note { width: 240px; max-width: 240px; }
  .erhu-illustration {flex-basis:220px;justify-content:flex-end;}
  .erhu-illustration img {width:200px;max-width:100%;height:190px;}
  .erhu-illustration figcaption {display:none;}
  .studio { padding: 22px 16px; }
  .about-sound {padding:24px 20px;}
  .sound-choice { flex-wrap: wrap; }
  .sound-choice>span { width: 100%; }
  .roll { height: 165px; }
}
@media (max-width: 480px) {
  h1 { font-size: 2.8rem; }
  .intro { padding: 27px 0 24px; }
  .intro {gap:12px;}
  .intro h1 {font-size:clamp(2rem,8.7vw,2.8rem);}
  .intro-copy {flex:1;}
  .erhu-illustration {flex:0 0 116px;}
  .erhu-illustration img {height:150px;}
  .intro-aside {font-size:.6875rem;}
  .transport button { padding: 9px 10px; font-size: .8125rem; }
  .midi button { font-size: .8125rem; }
  .keyboard-heading p { font-size: .75rem; }
  footer { font-size: .5625rem; }
}
