/* CodeForest service directory.
   One page, one job: show what is running and get you into it. Written from scratch rather than
   on top of Bootstrap, because a grid of cards and a header do not need a framework, and the
   framework's own resets were fighting the type scale. */

:root {
    color-scheme: light dark;

    --bg: #f4f2ee;
    --surface: #ffffff;
    --surface-2: #faf9f6;
    --line: #e3ded4;
    --ink: #23272e;
    --ink-soft: #6b7280;
    --accent: #2f7d68;
    --accent-soft: #e8f2ef;
    --shadow: 0 1px 2px rgba(35, 39, 46, .04), 0 8px 24px rgba(35, 39, 46, .06);
    --radius: 18px;
    --shell: 1080px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16181c;
        --surface: #1e2125;
        --surface-2: #23262b;
        --line: #31353b;
        --ink: #e8eaed;
        --ink-soft: #9aa1ab;
        --accent: #5db99d;
        --accent-soft: #1d2c28;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.shell { width: min(var(--shell), 100% - 40px); margin-inline: auto; }

@media (max-width: 560px) { .shell { width: min(var(--shell), 100% - 32px); } }

/* ---------- header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 62px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.01em; }

.brand__mark {
    display: grid;
    grid-template-columns: repeat(2, 7px);
    grid-auto-rows: 7px;
    gap: 3px;
}

.brand__mark span { border-radius: 2px; background: var(--accent); }
.brand__mark span:nth-child(2) { opacity: .55; }
.brand__mark span:nth-child(3) { opacity: .35; }
.brand__mark span:nth-child(4) { opacity: .75; }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease, background .15s ease;
}

.btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { border-color: var(--accent); filter: brightness(1.06); }

/* ---------- hero ---------- */

.hero { padding: 72px 0 40px; }
.hero__eyebrow { margin: 0 0 14px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .16em; }

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 5.2vw, 3rem);
    line-height: 1.22;
    letter-spacing: -.025em;
    font-weight: 800;
}

.hero p { margin: 0; max-width: 46ch; color: var(--ink-soft); font-size: 1.02rem; }

.hero__meta { display: flex; align-items: center; gap: 12px; margin-top: 24px; color: var(--ink-soft); font-size: .88rem; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------- service grid ---------- */

.services { padding: 8px 0 88px; }

.services__title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px;
}

.services__title h2 { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }
.services__title span { color: var(--ink-soft); font-size: .85rem; }

.card-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

a.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--card-accent, var(--accent)) 45%, var(--line)); }

.card__top { display: flex; align-items: center; gap: 12px; }

.card__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--card-accent, var(--accent)) 14%, transparent);
    color: var(--card-accent, var(--accent));
}

.card__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.card__name { margin: 0; font-size: 1.06rem; font-weight: 800; letter-spacing: -.015em; }
.card__summary { margin: 0; color: var(--ink-soft); font-size: .91rem; }

.card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }

.tag {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: .74rem;
    font-weight: 700;
}

.card__go { position: absolute; top: 22px; right: 20px; color: var(--ink-soft); font-size: 1.05rem; transition: transform .16s ease, color .16s ease; }
a.card:hover .card__go { transform: translateX(3px); color: var(--card-accent, var(--accent)); }

/* A service that is not live yet must not look clickable. */
.card--soon { background: var(--surface-2); box-shadow: none; }
.card--soon .card__name { color: var(--ink-soft); }

.badge-soon {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px dashed var(--line);
    color: var(--ink-soft);
    font-size: .74rem;
    font-weight: 800;
}

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--ink-soft); font-size: .86rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--ink); }

.icon-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    .card, .card__go, .btn { transition: none; }
    a.card:hover { transform: none; }
}

/* Signed-in name in the header. Not a menu: this page has nowhere to take you that the cards do
   not already, so it states who you are and stops there. */
.who { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 800; font-size: .92rem; }
.who span { color: var(--ink-soft); font-weight: 700; }

/* ---------- admin ---------- */
/* Dense on purpose: this page is read, not browsed. Numbers line up on the right so a column can
   be scanned without reading it, and the bars are plain divs because a chart library for seven
   rows a day is a dependency you maintain forever. */

.admin { padding-bottom: 72px; display: grid; gap: 20px; }

.admin__h {
    margin: 20px 0 0;
    font-size: 1.05rem;
    letter-spacing: -.01em;
}

.range { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
}

.chip--on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.stat {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.stat__label { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.stat__value { display: block; margin-top: 4px; font-size: 1.7rem; letter-spacing: -.02em; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.grid { width: 100%; border-collapse: collapse; font-size: .92rem; }
.grid th, .grid td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid thead th { font-size: .8rem; color: var(--ink-soft); background: var(--surface-2); }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.grid .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }

.soft { color: var(--ink-soft); }
.empty { padding: 18px; color: var(--ink-soft); text-align: center; }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; }
.bars__day { font-size: .8rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.bars__track { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bars__fill { display: block; height: 100%; background: var(--accent); }
.bars__n { font-size: .85rem; font-variant-numeric: tabular-nums; }

.note {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    display: grid;
    gap: 10px;
}

.note__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.note__subject { font-size: 1rem; }
.note__meta { margin: 4px 0 0; font-size: .82rem; color: var(--ink-soft); }
.note__body { margin: 0; white-space: pre-wrap; word-break: break-word; }
.note__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.note__actions form { margin: 0; }

.tag { flex: none; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.tag--open { background: #fde8e8; color: #b91c1c; }
.tag--answered { background: var(--accent-soft); color: var(--accent); }
.tag--closed { background: var(--surface-2); color: var(--ink-soft); }

.btn--small { min-height: 34px; padding: 0 12px; font-size: .84rem; }

@media (max-width: 640px) {
    .stat-row { grid-template-columns: 1fr; }
    .note__top { flex-direction: column; }
}
