/* The first-binder era: yellow card stock, cobalt, red and printed-paper details. */
@layer base {
  :root {
    --ink: #282b26;
    --ink-soft: #555c50;
    --paper: #f4f0df;
    --white: #fffdf3;
    --purple: #315eab;
    --purple-dark: #224787;
    --purple-light: #e0e8f2;
    --mint: #d0dfb7;
    --mint-dark: #355d35;
    --yellow: #f7d044;
    --yellow-dark: #765719;
    --coral: #edc0a1;
    --danger: #9b302c;
    --line: #d3c7a2;
    --radius: .45rem;
    --radius-lg: .7rem;
    --shadow: 3px 4px 0 #463f2630;
    --body: "Trebuchet MS", Arial, Verdana, sans-serif;
    --card-gold: #e8bf36;
    --card-edge: #b39737;
    --card-paper: #f6edc9;
    --card-blue: #214e98;
    --card-red: #b83e32;
  }
  body.site-shell {
    background-color: var(--paper);
    background-image: radial-gradient(#7c70401a .6px, transparent .8px);
    background-size: 5px 5px;
  }
  h1, h2, h3, h4 { font-family: "Trebuchet MS", Arial, sans-serif; letter-spacing: -.035em; }
  a:visited:not(.btn):not(.nav-link):not(.brand) { color: #4f5682; }
  ::selection { color: #172e51; background: #f7d044; }
  code, kbd { border-color: #d9c88f; background: #f5edce; }
}

@layer components {
  .site-header {
    background: linear-gradient(180deg,#2d5aa0,#214888);
    border-bottom: 5px solid var(--card-gold);
    box-shadow: 0 2px 0 #a48630;
  }
  .site-header::before { height: .2rem; background: #193765; }
  .header-inner { min-height: 5.5rem; gap: 1.65rem; }
  .brand img, img.brand { width: 14rem; }
  .site-header .nav-link { color: #fff5ce; border-radius: .25rem; }
  .site-header .nav-link:hover { color: #fff; background: #173c75; }
  .site-header .nav-link.is-active, .site-header .nav-link[aria-current="page"] {
    color: #2b2e24; background: #f7d044; border-color: #bca43b; box-shadow: 0 2px 0 #14335f;
  }
  .site-header .text-link { color: #fff2ad; }
  .site-header .header-actions > .btn-primary { color: #183d74; background: #f3cf4e; border-color: #c4a840; box-shadow: 0 3px 0 #17325e; }
  .site-header .header-actions > .btn-primary:hover { color: #173869; background: #ffe185; }
  .site-header .main-nav { border-top-color: #6680a9; }
  .site-header [data-menu-toggle] { color: #fff5cc; background: #173d77; border-color: #8da0bb; }
  .hero {
    grid-template-columns: 1.04fr .96fr;
    color: var(--ink);
    background: #eee0a7;
    border: 10px solid var(--card-gold);
    border-radius: .9rem;
    box-shadow: 0 0 0 1px #ac8f31, inset 0 0 0 2px #fff2b3, 5px 7px 0 #5a502627;
  }
  .hero-copy {
    padding: clamp(1.75rem,3.5vw,3rem);
    background: radial-gradient(ellipse at 25% 20%,#fff6d4b0,transparent 70%),linear-gradient(135deg,#f4e8b8,#e7dcaa);
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .hero .eyebrow { color: #63552b; font-size: .8125rem; letter-spacing: .075em; }
  .eyebrow::before { content: "◆"; font-size: .85em; }
  .hero-title {
    max-width: 12ch;
    color: #262c25;
    font-family: "Arial Black","Trebuchet MS",Arial,sans-serif;
    font-size: clamp(2.6rem,4.5vw,4.1rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -.055em;
  }
  .hero-title em { color: #244e94; }
  .hero-description { color: #414735; font-size: 1.0625rem; line-height: 1.65; }
  .hero-actions { margin-top: 1.5rem; gap: .8rem; }
  .hero .btn-primary { color: #fff9e8; background: var(--card-red); border-color: #7c302b; box-shadow: 0 3px 0 #7a3027; }
  .hero .btn-primary:hover { color: #fff; background: #a5322a; }
  .hero .btn-secondary { color: #234c88; background: #fff4c8; border-color: #9e8c53; box-shadow: 0 3px 0 #baa35f; }
  .hero .btn-secondary:hover { color: #143965; background: #fff9e5; border-color: #8b773c; }
  .hero-note { color: #626144; font-size: .75rem; letter-spacing: 0; }
  .hero-note::before { color: #44613c; }
  .hero-art {
    position: relative;
    min-height: 29rem;
    padding: 1.75rem .25rem 1rem;
    background: radial-gradient(ellipse at 45% 48%,#7597bb55,transparent 65%),linear-gradient(135deg,#305e9a,#153f7f);
    border-left: 2px solid #ac9b5b;
    overflow: hidden;
  }
  .hero-art::before {
    z-index: 0;
    background: repeating-linear-gradient(110deg,transparent 0 26px,#ffffff04 26px 27px),radial-gradient(#d3ddec22 .6px,transparent 1px);
    background-size: auto,5px 5px;
    opacity: 1;
  }
  .hero-fan { position: relative; width: min(100%,34rem); aspect-ratio: 1.22; z-index: 1; }
  .hero-card {
    position: absolute; display: block; width: 36%; top: 24%; left: 8%;
    transform: rotate(-15deg); border-radius: 3.8%;
    box-shadow: 0 12px 14px #071e4455,0 0 0 1px #e9cf70;
    transition: transform 180ms ease;
  }
  .hero-card:nth-of-type(2) { width: 41%; left: 30%; top: 14%; z-index: 3; transform: rotate(3deg); }
  .hero-card:nth-of-type(3) { width: 36%; left: auto; right: 3%; top: 26%; z-index: 2; transform: rotate(15deg); }
  .hero-card:hover { transform: rotate(-11deg) translateY(-.5rem); }
  .hero-card:nth-of-type(2):hover { transform: rotate(0) translateY(-.5rem); }
  .hero-card:nth-of-type(3):hover { transform: rotate(11deg) translateY(-.5rem); }
  .hero-card img { width: 100%; height: auto; aspect-ratio: 63 / 88; object-fit: contain; border-radius: inherit; }
  .hero-era, .hero-caption {
    position: absolute; color: #f9e9a9; font-family: var(--mono); font-weight: 700;
    font-size: .6875rem; letter-spacing: .15em; text-align: center; left: 0; right: 0;
  }
  .hero-era { top: 3%; }
  .hero-caption { bottom: 1%; letter-spacing: .1em; }
  .hero-fan::after { content: "✦"; position: absolute; right: 11%; top: 10%; color: #f9dc65; font-size: 2.25rem; transform: rotate(15deg); }
  .section-title::after { background: #d0a82b; box-shadow: 1.1rem 0 0 #416fa9,2.2rem 0 0 #84a36b; }
  .btn { border-radius: .3rem; box-shadow: 0 3px 0 #463e2366; border-color: #9c8e63; }
  .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #463e2366; }
  .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #463e2366; }
  .btn-primary { color: #fffdf0; background: #28539a; border-color: #193e78; box-shadow: 0 3px 0 #173366; }
  .btn-primary:hover { color: #fff; background: #214785; }
  .btn-secondary { color: #323d2c; background: #e8e4bd; border-color: #a89d62; }
  .btn-secondary:hover { background: #f1edce; }
  .btn-ghost { color: #244c8b; background: transparent; border-color: #c8c3a9; box-shadow: none; }
  .btn-ghost:hover { background: #eee7ca; border-color: #9e9a7c; box-shadow: none; }
  .btn-danger { color: white; background: #9b302c; border-color: #6f2421; }
  .btn-danger:hover { color: white; background: #812722; }
  .panel, .auth-card, .profile-header, .binder-card, .collector-card {
    border-color: #c3aa56;
    border-radius: .45rem;
    box-shadow: 3px 4px 0 #6859321c;
    background: #fffdf2;
  }
  .panel-header { background: #ebe2b7; border-color: #c5b77a; }
  .panel-footer { background: #f6f0d9; border-color: #d9ceaa; }
  .panel-mint .panel-header { background: #d6e0bb; }
  .panel-yellow .panel-header { background: #f3df8b; }
  .stat-card { border: 1px solid #c5b77b; border-top-width: .35rem; border-radius: .3rem; background: #fffdf1; box-shadow: 2px 3px 0 #6b5c3520; }
  .stat-card:nth-child(4n+1) { border-top-color: #4a76af; }
  .stat-card:nth-child(4n+2) { border-top-color: #819d5d; }
  .stat-card:nth-child(4n+3) { border-top-color: #d5ad31; }
  .stat-card:nth-child(4n) { border-top-color: #ba6150; }
  .stat-number { font-family: "Trebuchet MS",Arial,sans-serif; font-weight: 800; }
  .toolbar { border-color: #cfc29a; border-radius: .35rem; background: #fdf9e9; }
  .set-card { border: 5px solid #e5c34b; border-radius: .55rem; background: #faf3d5; box-shadow: 1px 1px 0 #a99039,3px 5px 0 #73623b26; }
  .set-card:hover { box-shadow: 1px 1px 0 #a99039,4px 7px 0 #73623b30; }
  .set-card-art { min-height: 8.5rem; border: 1px solid #b8a765; border-radius: .15rem; margin: .3rem .3rem 0; background: radial-gradient(ellipse at 30% 20%,#e9edbd70,transparent),#b5cb93; }
  .set-card:nth-child(4n+2) .set-card-art { background: radial-gradient(ellipse at 60% 30%,#e5eee780,transparent),#a4bed8; }
  .set-card:nth-child(4n+3) .set-card-art { background: radial-gradient(ellipse at 25% 25%,#ffe5ad90,transparent),#e3ae84; }
  .set-card:nth-child(4n+4) .set-card-art { background: radial-gradient(ellipse at 40% 20%,#fff4a7a0,transparent),#e4cc70; }
  .set-card-art::before, .set-card-art::after { content: "✦"; color: #3d4c412d; font-size: 1.5rem; }
  .set-card-art .set-code { font-family: "Arial Black","Trebuchet MS",sans-serif; font-size: 1.5rem; letter-spacing: -.01em; transform: rotate(-3deg); border-color: #8c885c; background: #fff6d9ce; box-shadow: 2px 2px 0 #564d2c30; }
  .set-card-body { border-top: 1px solid #c7b577; margin-top: .4rem; }
  .set-name { font-family: Arial,"Trebuchet MS",sans-serif; font-weight: 800; font-size: 1.125rem; }
  .set-card .set-code { color: #364e35; }
  .set-count { color: #42513e; }
  .progress-track { border-color: #c2b88c; background: #e7dfc3; }
  .progress-bar { background: #4a78af; border-right-color: #2a4f86; }
  .card-tile { border-color: #d3c281; border-radius: .45rem; background: #fcf6dd; box-shadow: 2px 3px 0 #6c5b2f26; }
  .card-tile:hover { border-color: #b79c3e; box-shadow: 2px 5px 0 #6c5b2f30; }
  .card-tile.is-selected { border-color: #24559a; box-shadow: 0 0 0 2px #a9c4df,2px 3px 0 #173d7770; }
  .card-art { margin: .4rem .4rem 0; border-radius: .3rem; background: #e9dfb7; }
  .card-info { border-top: 1px solid #c4b781; margin-top: .55rem; padding-top: .7rem; }
  .card-name { font-family: Arial,"Trebuchet MS",sans-serif; font-weight: 800; letter-spacing: -.025em; }
  .card-number { color: #676144; }
  .card-meta { color: #585a47; }
  .owned-badge { color: #26432d; background: #d9e6ba; border-color: #7c965a; }
  .badge { color: #284d78; background: #e0e8eb; border-color: #a6b7c1; }
  .badge-muted { color: #625c45; background: #eee8d5; border-color: #d4c9a6; }
  .badge-mint { color: #365737; background: #dde7c6; border-color: #adbd8c; }
  .badge-yellow { color: #6c4e12; background: #f8e7a1; border-color: #d4b85d; }
  .field-input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field textarea, .search-input,
  .filter-form select, .filters select, select.field-input { border-color: #b8af8d; border-radius: .25rem; background-color: #fffef7; box-shadow: inset 0 2px 1px #e2d9b533; }
  .field input[type="file"] { background: #f5f0dc; border-color: #baad7b; }
  .field input[type="file"]::file-selector-button { background: #e2e9ee; border-color: #8298b7; }
  .field-help { color: #64634f; }
  .form-stack input:focus, .form-stack textarea:focus { border-color: #4d719f; outline-color: #cbd9e3; }
  .auth-card, .profile-header { border-top: .45rem solid #d7b53a; }
  .auth-card { background: #fbf6e0; }
  .profile-avatar { color: #244b7e; background: #d5e0d5; border-color: #a99654; box-shadow: 2px 2px 0 #dfc044; }
  .profile-bio, .profile-stats span { color: #555c50; }
  .binder-cover { background: #c65242; border-bottom-color: #a68e50; }
  .binder-card:nth-child(3n+2) .binder-cover { background: #42669c; }
  .binder-card:nth-child(3n) .binder-cover { background: #739257; }
  .binder-cover::before { background: #0000001a; border-right-color: #0000003b; }
  .binder-cover .binder-label { color: #332f22; background: #f4e5ac; border-color: #9e8d53; box-shadow: 2px 2px 0 #00000022; }
  .settings-nav { border-color: #c6b570; background: #fbf6e1; }
  .settings-nav a:hover { background: #f0e8c7; }
  .settings-nav a.is-active { color: #264d84; background: #e0e5da; }
  .tabs { border-color: #cfc29a; background: #eee6c8; }
  .tab.is-active { background: #fff9df; color: #254b7f; border-color: #c2b477; }
  .bulk-bar { color: #284b77; border-color: #b2c0c9; background: #e1e7e4; }
  .detail-art { padding: .8rem; background: #f4d45b; border-color: #b39b44; border-radius: .65rem; box-shadow: 4px 5px 0 #73643e30; }
  .detail-art > img { border-radius: .35rem; }
  .detail-meta, .detail-copy { color: #5b5e4f; }
  .data-table th { color: #5d563d; background: #eae2bc; border-color: #c8b77f; }
  .data-table td { border-color: #e0d8ba; }
  .empty-state { background: #fbf7e7; border-color: #bcb18a; border-radius: .5rem; }
  .empty-icon { background: #e8e1b8; border-color: #b29d55; box-shadow: 2px 3px 0 #6b5a3625; }
  .site-footer { background: #1d3e70; border-top-color: #e1bc3c; color: #eee8ce; }
  .footer-brand { font-weight: 900; color: #f4d04b; }
  .site-footer a, .site-footer a:visited { color: #ffe28b; }
  .footer-note { color: #c4cbd0; }
  .footer-stamp { color: #f0e4ab; border-color: #7e94ab; }
  @media (max-width: 75rem) {
    .header-inner { gap: .8rem; }
    .brand img, img.brand { width: 12rem; }
    .hero-copy { padding: 2rem; }
    .hero-title { font-size: 3.35rem; }
    .hero-art { min-height: 26rem; }
  }
  @media (max-width: 62rem) {
    .hero { grid-template-columns: 1.04fr .96fr; }
    .hero-title { font-size: 2.75rem; }
    .hero-copy { padding: 1.75rem; }
    .hero-art { min-height: 25rem; }
    .hero-era, .hero-caption { font-size: .625rem; letter-spacing: .06em; }
  }
  @media (max-width: 48rem) {
    .brand img, img.brand { width: 10.75rem; }
    .hero { grid-template-columns: 1fr; border-width: 7px; }
    .hero-copy { padding: 2rem 1.4rem; }
    .hero-title { max-width: 15ch; font-size: 3rem; }
    .hero-description { max-width: 34rem; }
    .hero-art { height: auto; min-height: 19rem; padding: 1.5rem .5rem 1rem; border-left: 0; border-top: 2px solid #aa9652; }
    .hero-fan { max-width: 29rem; }
    .hero-era, .hero-caption { font-size: .6875rem; letter-spacing: .08em; }
  }
  @media (max-width: 35rem) {
    .header-inner { gap: .5rem; min-height: 4.8rem; }
    .brand img, img.brand { width: 9.75rem; }
    .hero-copy { padding: 1.6rem 1.15rem 1.8rem; }
    .hero-title { font-size: 2.25rem; }
    .hero .eyebrow { font-size: .7rem; }
    .hero-art { min-height: 18rem; padding-top: 1.25rem; }
    .hero-era, .hero-caption { font-size: .6rem; }
    .hero-note { font-size: .6875rem; }
    .set-card { border-width: 4px; }
    .set-card-art { min-height: 6.5rem; padding: .8rem; }
    .set-card-art .set-code { font-size: 1.1rem; }
    .set-name { font-size: 1rem; }
    .card-info { margin-top: .4rem; }
    .card-art { margin: .3rem .3rem 0; }
  }
}
