:root {
    --ink: #111827;
    --muted: #5b6575;
    --line: #e4e7ec;
    --paper: #fbf7ef;
    --surface: #ffffff;
    --accent: #0f766e;
    --accent-dark: #134e4a;
    --gold: #d99b25;
    --blue: #1d4ed8;
    --cream: #fff7e5;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(17, 24, 39, .12);
    font-family: Avenir, "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 10%, rgba(217, 155, 37, .18), transparent 34rem),
        radial-gradient(circle at 85% 6%, rgba(15, 118, 110, .16), transparent 30rem),
        linear-gradient(180deg, #fffaf0 0%, #f7f9f5 48%, #ffffff 100%);
}
a { color: inherit; }
.site-header, .site-footer, main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 0;
}
.brand, .site-nav, .footer-links, .card-meta, .card-actions, .prompt-toolbar, .cta-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand { text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
    background: var(--ink);
    color: #fff;
    border-radius: 999px;
    padding: 10px 12px;
}
.site-nav a, .footer-links a { color: var(--muted); text-decoration: none; font-weight: 700; }
.hero, .page-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 36px;
    padding: clamp(34px, 7vw, 86px);
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.72)),
        radial-gradient(circle at 82% 28%, rgba(15,118,110,.18), transparent 18rem);
    box-shadow: var(--shadow);
}
.hero:after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -70px;
    top: -70px;
    border-radius: 999px;
    background: repeating-linear-gradient(45deg, rgba(15,118,110,.16), rgba(15,118,110,.16) 8px, transparent 8px, transparent 16px);
}
.hero-content { position: relative; z-index: 1; }
.hero h1, .page-hero h1 {
    max-width: 920px;
    margin: 0;
    font-size: clamp(2.35rem, 7vw, 5.7rem);
    line-height: .92;
    letter-spacing: -.075em;
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 4.4rem); }
.narrow { max-width: 860px; }
.hero-subtext, .page-hero p, .prompt-detail-header p {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.14rem;
    line-height: 1.7;
}
.eyebrow {
    color: var(--accent-dark);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 900;
    font-size: .78rem;
}
.search-panel, .filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 28px;
}
.filters { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}
textarea { min-height: 120px; }
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
}
.button.ghost { background: #eef7f5; color: var(--accent-dark); }
.button.light { background: #fff; color: var(--ink); border: 1px solid rgba(17,24,39,.1); }
.button.slim { padding: 10px 14px; font-size: .9rem; }
.button.danger { background: #b42318; margin-top: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.trust-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.trust-points span {
    border: 1px solid rgba(15, 118, 110, .18);
    background: rgba(238, 247, 245, .78);
    border-radius: 999px;
    color: var(--accent-dark);
    font-weight: 800;
    padding: 9px 12px;
    font-size: .9rem;
}
.section { margin: 56px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.section-heading h2, .content-block h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.5rem); letter-spacing: -.04em; }
.category-grid, .card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.card-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.category-tile, .prompt-card, .content-block, .cta-panel, .notice, .prompt-copy-panel, .prompt-sidebar {
    background: rgba(255, 255, 255, .88);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: 0 12px 40px rgba(17, 24, 39, .06);
}
.category-tile { text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.category-tile:hover, .prompt-card:hover { transform: translateY(-3px); box-shadow: 0 18px 46px rgba(17, 24, 39, .1); }
.category-tile.polished { display: grid; gap: 12px; min-height: 210px; }
.category-topline { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.category-tile em { color: var(--accent); font-style: normal; font-weight: 900; align-self: end; }
.category-tile span, .card-meta, .card-actions, .stat span { color: var(--muted); font-size: .9rem; }
.category-tile p, .prompt-card p { color: var(--muted); line-height: 1.55; }
.prompt-card { display: flex; flex-direction: column; min-height: 285px; transition: transform .18s ease, box-shadow .18s ease; }
.prompt-card h3 { margin: 14px 0 8px; font-size: 1.25rem; letter-spacing: -.035em; line-height: 1.12; }
.prompt-card h3 a { text-decoration: none; }
.card-meta { flex-wrap: wrap; gap: 8px; }
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f2f4f7;
    border: 1px solid #e4e7ec;
    color: #344054;
    padding: 6px 9px;
    text-decoration: none;
    font-weight: 800;
}
.category-badge { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.tool-badge { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.card-actions { margin-top: auto; flex-wrap: wrap; }
.copy-count { margin-left: auto; white-space: nowrap; }
.split-section { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .75fr); gap: 24px; align-items: start; }
.cta-panel { background: #11201f; color: #fff; position: sticky; top: 18px; }
.cta-panel p { color: #cbd5d3; line-height: 1.65; }
.cta-panel span { color: var(--gold); font-weight: 900; }
.prompt-detail-header { margin: 36px 0 22px; }
.prompt-detail-header h1 { font-size: clamp(2rem, 5vw, 4.6rem); line-height: .98; letter-spacing: -.06em; margin: 10px 0; }
.prompt-shell { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; }
.detail-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}
.detail-facts div {
    background: rgba(255,255,255,.86);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
}
.detail-facts span { display: block; color: var(--muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.detail-facts strong { display: block; margin-top: 6px; }
pre {
    white-space: pre-wrap;
    overflow: auto;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 18px;
    padding: 24px;
    line-height: 1.6;
    font-size: .98rem;
}
.prompt-toolbar { justify-content: space-between; }
.sidebar-block { margin-bottom: 20px; }
.sidebar-block h2 { margin: 0 0 8px; font-size: 1.1rem; }
.sidebar-block p { color: var(--muted); line-height: 1.55; }
.stat { display: grid; gap: 4px; margin-bottom: 14px; }
.stat strong { font-size: 2rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span { background: #f2f4f7; border-radius: 999px; padding: 8px 10px; font-size: .86rem; }
.cta-row { justify-content: space-between; background: #fff4d8; border: 1px solid #f2d18b; border-radius: var(--radius); padding: 24px; margin: 38px 0; flex-wrap: wrap; }
.richly-cta {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    border-radius: 34px;
    padding: clamp(26px, 5vw, 56px);
    background:
        radial-gradient(circle at 8% 20%, rgba(217,155,37,.22), transparent 20rem),
        linear-gradient(135deg, #10201f, #163d39);
    color: #fff;
    margin: 58px 0;
}
.richly-cta p { color: #d9e7e4; max-width: 700px; line-height: 1.65; }
.richly-cta h2 { margin: 0; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -.06em; }
.breadcrumbs { display: flex; gap: 8px; margin: 8px 0 20px; color: var(--muted); font-size: .92rem; }
.admin-table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.admin-table { border-collapse: collapse; width: 100%; min-width: 840px; }
.admin-table th, .admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.admin-form { display: grid; gap: 18px; max-width: 940px; }
.admin-form label { display: grid; gap: 8px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.checkbox { display: flex !important; align-items: center; }
.checkbox input { width: auto; }
.pagination { display: flex; gap: 8px; list-style: none; padding: 0; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; padding: 10px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 800; }
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 48px 0; color: var(--muted); }
.empty-state { grid-column: 1 / -1; padding: 48px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: rgba(255,255,255,.72); text-align: center; font-weight: 800; }
.notice.error { border-color: #fda29b; background: #fff1f0; }
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 42px 0; }
.check-list { display: grid; gap: 12px; padding-left: 0; list-style: none; }
.check-list li {
    padding-left: 30px;
    position: relative;
    color: var(--muted);
}
.check-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: .35em;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: inset 0 0 0 5px #d9f5ef;
}
.library-filters {
    background: rgba(255,255,255,.86);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: 0 14px 44px rgba(17,24,39,.06);
}

@media (max-width: 900px) {
    .site-header, .site-footer, .split-section, .prompt-shell, .richly-cta { display: grid; }
    .site-nav, .footer-links { flex-wrap: wrap; }
    .search-panel, .filters, .category-grid, .card-grid, .card-grid.compact, .form-grid, .detail-facts, .content-grid { grid-template-columns: 1fr; }
    .hero, .page-hero { padding: 32px 22px; border-radius: 24px; }
    .site-footer { padding-bottom: 28px; }
    .copy-count { margin-left: 0; }
}
