:root {
    color-scheme: light;
    --bg: #f8f9f8;
    --surface: #ffffff;
    --surface-alt: #f1f5f3;
    --text: #121416;
    --muted: #697077;
    --line: #e2e6e4;
    --primary: #13584f;
    --primary-dark: #0e403a;
    --accent: #a46a19;
    --success: #147a3f;
    --danger: #b4233c;
    --warning: #8b5a10;
    --shadow: 0 20px 55px rgba(18, 20, 22, 0.07);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Aptos, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

input,
textarea,
button {
    font: inherit;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 760;
    letter-spacing: 0;
}

.brand-large {
    font-size: 22px;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    background: #151716;
    color: #fff;
}

.brand-mark svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
}

.header-actions a:hover {
    color: var(--text);
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    padding: 0 18px;
    cursor: pointer;
    font-weight: 720;
    white-space: nowrap;
}

.button:hover {
    border-color: #b9c5d0;
}

.button-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.button-primary:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.button-light {
    border-color: #fff;
    background: #fff;
    color: var(--text);
}

.button-small {
    min-height: 36px;
    padding: 0 14px;
    font-size: 14px;
}

.search-band {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.search-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(400px, 1.05fr);
    gap: 56px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 74px 24px 68px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 780;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    max-width: 760px;
    margin: 0;
    font-family: "SF Pro Display", Aptos, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 48px;
    font-weight: 760;
    line-height: 1.04;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-family: "SF Pro Display", Aptos, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 27px;
    font-weight: 720;
    line-height: 1.18;
    letter-spacing: 0;
}

h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 760;
    letter-spacing: 0;
}

.search-copy p:last-child {
    max-width: 560px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.domain-search {
    display: grid;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.domain-search label,
.stack-form label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 720;
}

.search-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

input,
textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    padding: 10px 13px;
    outline: none;
}

textarea {
    min-height: 92px;
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(19, 88, 79, 0.11);
}

.search-hint,
.muted {
    color: var(--muted);
}

.search-hint {
    margin: 0;
    font-size: 13px;
}

.content-section,
.result-section,
.guide-section,
.commerce-band,
.service-grid {
    max-width: 1120px;
    margin: 0 auto;
    padding: 44px 24px;
}

.result-section {
    display: grid;
    gap: 16px;
}

.result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.result-panel,
.admin-panel,
.setup-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 0 rgba(18, 20, 22, 0.03), var(--shadow);
}

.result-panel,
.admin-panel {
    padding: 22px;
}

.result-message {
    margin: 0 0 16px;
    color: var(--muted);
}

.status-pill {
    display: inline-flex;
    min-width: 96px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 780;
}

.is-available {
    background: rgba(17, 138, 70, 0.12);
    color: var(--success);
}

.is-registered {
    background: rgba(190, 18, 60, 0.11);
    color: var(--danger);
}

.is-unknown {
    background: rgba(154, 91, 0, 0.13);
    color: var(--warning);
}

.meta-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.meta-list div {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.meta-list div:last-child {
    border-bottom: 0;
}

.meta-list dt {
    color: var(--muted);
    font-weight: 700;
}

.meta-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.owner-panel {
    display: grid;
    gap: 18px;
}

.owner-panel h3 {
    margin: 0;
    font-size: 23px;
}

.owner-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.owner-list div {
    min-height: 114px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfc;
    padding: 16px;
}

.owner-list dt {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 720;
}

.owner-list dd {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 720;
    overflow-wrap: anywhere;
}

.privacy-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.info-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.info-columns section {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tag-list li,
.suggestion-list a {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
    color: var(--text);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.commerce-band {
    max-width: none;
    margin-top: 12px;
    padding: 44px 0;
    background: #15231f;
    color: #fff;
}

.commerce-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 2px 24px;
}

.commerce-inner p {
    max-width: 640px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.78);
}

.commerce-inner .eyebrow {
    color: #e0b15f;
}

.section-title {
    margin-bottom: 18px;
}

.suggestion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.suggestion-list a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.dns-table {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.dns-table div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.dns-table div:last-child {
    border-bottom: 0;
}

.dns-table span {
    overflow-wrap: anywhere;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.service-tile {
    display: grid;
    gap: 10px;
    min-height: 178px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 22px;
}

.service-tile:hover {
    border-color: var(--primary);
}

.service-tile span {
    color: var(--accent);
    font-weight: 780;
}

.service-tile p,
.guide-copy p {
    margin: 0;
    color: var(--muted);
}

.guide-copy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    max-width: 1120px;
    margin: 30px auto 0;
    padding: 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.setup-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.setup-shell {
    width: min(760px, 100%);
}

.setup-card {
    display: grid;
    gap: 18px;
    padding: 30px;
}

.setup-card h1 {
    font-size: 34px;
}

.stack-form {
    display: grid;
    gap: 15px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.notice {
    border-radius: 8px;
    padding: 14px 16px;
    font-weight: 720;
}

.notice p {
    margin: 0 0 6px;
}

.notice p:last-child {
    margin-bottom: 0;
}

.notice-error {
    border: 1px solid rgba(190, 18, 60, 0.25);
    background: rgba(190, 18, 60, 0.08);
    color: var(--danger);
}

.notice-success {
    border: 1px solid rgba(17, 138, 70, 0.25);
    background: rgba(17, 138, 70, 0.08);
    color: var(--success);
}

.admin-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px;
}

.admin-title,
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.admin-title {
    padding: 24px 0;
}

.admin-title h1 {
    font-size: 36px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.stat-grid article {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}

.stat-grid span {
    color: var(--muted);
}

.stat-grid strong {
    font-size: 30px;
    font-weight: 760;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 16px;
    margin-bottom: 16px;
}

.mini-list {
    display: grid;
    gap: 8px;
    margin-top: 24px;
}

.mini-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.mini-list span {
    overflow-wrap: anywhere;
}

.log-table {
    display: grid;
    overflow-x: auto;
}

.log-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.2fr) 100px 100px 130px 90px 150px;
    min-width: 840px;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.log-row span {
    overflow-wrap: anywhere;
}

.log-head {
    color: var(--muted);
    font-weight: 760;
}

@media (max-width: 900px) {
    .site-header,
    .admin-title,
    .commerce-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-layout,
    .result-grid,
    .info-columns,
    .owner-list,
    .guide-copy,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .search-layout {
        padding: 44px 20px;
    }

    h1 {
        font-size: 38px;
    }

    .service-grid,
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .search-control,
    .form-grid,
    .service-grid,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 24px;
    }

    .result-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .meta-list div,
    .owner-list div,
    .dns-table div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
