:root {
    --ink: #14231f;
    --ink-soft: #2c4039;
    --paper: #f3efe4;
    --paper-2: #e7f0ea;
    --foam: #fbf8f1;
    --accent: #0f7a66;
    --accent-2: #d97706;
    --line: rgba(20, 35, 31, 0.12);
    --shadow: 0 24px 60px rgba(20, 35, 31, 0.12);
    --radius: 22px;
    --font-sans: "Manrope", sans-serif;
    --font-display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 10% -10%, #d8efe6 0%, transparent 55%),
        radial-gradient(900px 500px at 100% 0%, #f6e2c4 0%, transparent 50%),
        linear-gradient(180deg, var(--foam), var(--paper) 45%, var(--paper-2));
    min-height: 100vh;
    line-height: 1.55;
}

.noise {
    pointer-events: none;
    position: fixed;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    z-index: 0;
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin-inline: auto;
    position: relative;
    z-index: 1;
}
.narrow { width: min(760px, calc(100% - 2rem)); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(251, 248, 241, 0.78);
    border-bottom: 1px solid var(--line);
}
.header-inner, .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--ink);
}
.brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 0.7rem;
    background:
        linear-gradient(145deg, #1aa587, #0f7a66 55%, #0b5f4f);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
    animation: pulseMark 4s ease-in-out infinite;
}
.brand-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
.nav { display: flex; gap: 1.25rem; }
.nav a {
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 600;
}
.nav a:hover { color: var(--accent); }
.lang-switch {
    display: inline-flex;
    padding: 0.2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,0.7);
    gap: 0.15rem;
}
.lang-btn {
    min-width: 2.4rem;
    text-align: center;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active {
    background: var(--ink);
    color: #fff;
}

.hero {
    padding: 3.5rem 0 2.5rem;
    min-height: min(78vh, 720px);
    display: flex;
    align-items: center;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: center;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 0.8rem;
}
.brand-hero {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 8vw, 5.4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin: 0 0 0.8rem;
    animation: riseIn 700ms ease both;
}
.hero-title, .tool-intro h1, .section-head h1, .section-head h2, .blog-post h1 {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.hero-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 0 1rem;
    max-width: 18ch;
    animation: riseIn 800ms ease both;
}
.lead {
    color: var(--ink-soft);
    font-size: 1.08rem;
    max-width: 42ch;
    margin: 0 0 1.5rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 0;
    border-radius: 999px;
    padding: 0.9rem 1.35rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: linear-gradient(135deg, #12997f, #0f7a66);
    color: #fff;
    box-shadow: 0 12px 28px rgba(15, 122, 102, 0.28);
}
.btn-primary:hover { color: #fff; }
.btn-ghost {
    background: rgba(255,255,255,0.55);
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn-block { width: 100%; }
.tool-panel form > .btn-block[type="submit"],
.tool-panel form > button.btn-block {
    margin-top: 1.25rem;
}
.btn[disabled] { opacity: 0.65; cursor: wait; transform: none; }

.hero-visual {
    position: relative;
    min-height: 340px;
    animation: floaty 7s ease-in-out infinite;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
}
.orb-a {
    width: 220px; height: 220px;
    right: 10%; top: 10%;
    background: radial-gradient(circle at 30% 30%, #7ad9c2, #0f7a66);
    opacity: 0.85;
}
.orb-b {
    width: 140px; height: 140px;
    left: 8%; bottom: 12%;
    background: radial-gradient(circle at 30% 30%, #ffd089, #d97706);
    opacity: 0.75;
}
.sheet {
    position: absolute;
    inset: 18% 16% 18% 22%;
    border-radius: 18px;
    background: #fffdf8;
    box-shadow: var(--shadow);
}
.sheet-back {
    transform: rotate(-8deg) translate(-8px, 10px);
    background: #e8f5ef;
}
.sheet-front {
    transform: rotate(4deg);
    padding: 1.6rem;
    display: grid;
    gap: 0.8rem;
    align-content: center;
}
.sheet-front span {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d9ebe3, #f0e4cf);
}
.sheet-front span:nth-child(2) { width: 78%; }
.sheet-front span:nth-child(3) { width: 54%; }

.section { padding: 3.5rem 0; }
.section-soft {
    background: rgba(255,255,255,0.35);
    border-block: 1px solid var(--line);
}
.section-head { margin-bottom: 1.8rem; max-width: 48ch; }
.section-head h1, .section-head h2 { margin: 0 0 0.6rem; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-head p, .empty { color: var(--ink-soft); }
.section-more { margin-top: 1.5rem; }

.tool-grid, .post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.tool-tile, .post-teaser, .tool-panel, .post-row {
    background: rgba(255,253,248,0.88);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(20, 35, 31, 0.05);
}
.tool-tile {
    padding: 1.4rem;
    text-decoration: none;
    color: inherit;
    transition: transform 200ms ease, border-color 200ms ease;
}
.tool-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 122, 102, 0.35);
}
.tool-icon {
    width: 2.6rem;
    height: 2.6rem;
    display: grid;
    place-items: center;
    border-radius: 0.9rem;
    background: #e5f4ef;
    margin-bottom: 1rem;
}
.tool-icon::before {
    content: "";
    width: 1.15rem;
    height: 1.15rem;
    background: var(--accent);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0);
    border-radius: 3px;
    box-shadow: inset 0 0 0 2px #fff;
}
.tool-tile h3, .post-teaser h3, .post-row h2 { margin: 0 0 0.5rem; font-family: var(--font-display); }
.tool-tile p, .post-teaser p, .post-row p { margin: 0; color: var(--ink-soft); }
.post-teaser { padding: 1.3rem; }
.post-teaser time, .post-row time, .post-header time {
    color: var(--accent-2);
    font-size: 0.85rem;
    font-weight: 700;
}

.tool-page { padding: 2.5rem 0 1.5rem; }
.more-tools {
    padding-top: 1.5rem;
    padding-bottom: 3.5rem;
}
.more-tools .section-head { margin-bottom: 1.2rem; }
.tool-shell {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 2rem;
    align-items: start;
}
.tool-intro h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 0.8rem; }
.tool-panel { padding: 1.4rem; position: relative; overflow: hidden; }
.dropzone {
    display: grid;
    place-items: center;
    text-align: center;
    gap: 0.35rem;
    min-height: 220px;
    padding: 1.5rem;
    border: 1.5px dashed rgba(15, 122, 102, 0.45);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(229, 244, 239, 0.75), rgba(255,253,248,0.9));
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}
.dropzone.is-dragover {
    border-color: var(--accent);
    transform: scale(1.01);
    background: #e9f7f2;
}
.dropzone-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: linear-gradient(145deg, #1aa587, #0f7a66);
    margin-bottom: 0.4rem;
    position: relative;
}
.dropzone-icon::before, .dropzone-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
}
.dropzone-icon::before { width: 0.2rem; height: 1.15rem; }
.dropzone-icon::after { width: 1.15rem; height: 0.2rem; }
.dropzone-title { font-weight: 700; font-size: 1.1rem; }
.dropzone-sub { color: var(--ink-soft); font-size: 0.95rem; }
.file-chip {
    margin-top: 0.6rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: 0.9rem;
}
.field-row { margin: 1.1rem 0; display: grid; gap: 0.4rem; }
.field-row label { font-weight: 700; }
select, .field-row input[type="text"] {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
    font: inherit;
    background: #fff;
}
.stats:has([data-saved-wrap][hidden]) {
    grid-template-columns: repeat(2, 1fr);
}
.progress-wrap {
    margin-top: 1.1rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: #f3faf7;
    border: 1px solid rgba(15, 122, 102, 0.16);
}
.progress-wrap.is-active .progress-meta span {
    animation: progressPulse 1.1s ease-in-out infinite;
}
.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
    font-size: 0.92rem;
}
.progress-meta span { color: var(--ink-soft); font-weight: 600; }
.progress-meta strong {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.progress-track {
    position: relative;
    height: 0.85rem;
    border-radius: 999px;
    background: rgba(20, 35, 31, 0.08);
    overflow: hidden;
}
.progress-fill {
    position: relative;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1bb995, #0f7a66 45%, #0b5f4f);
    box-shadow: 0 0 16px rgba(15, 122, 102, 0.35);
    transition: width 220ms ease-out;
    overflow: hidden;
}
.progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 25%,
        rgba(255, 255, 255, 0.45) 45%,
        transparent 65%
    );
    transform: translateX(-120%);
    animation: progressShine 1.15s linear infinite;
}
.progress-wrap.is-active .progress-track::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(15, 122, 102, 0.12),
        transparent
    );
    background-size: 40% 100%;
    animation: progressSweep 1.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}
@keyframes progressShine {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}
@keyframes progressSweep {
    0% { background-position: -40% 0; }
    100% { background-position: 140% 0; }
}
@keyframes progressPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}
.form-status {
    margin: 0.9rem 0 0;
    color: #9a3412;
    font-weight: 600;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: #fff1eb;
    border: 1px solid rgba(154, 52, 18, 0.25);
}
.result-panel { text-align: center; }
.result-panel h2 {
    font-family: var(--font-display);
    margin: 0.4rem 0 1.2rem;
}
.result-check {
    width: 3.2rem;
    height: 3.2rem;
    margin: 0.2rem auto 0.8rem;
    border-radius: 50%;
    background: #d9f5ea;
    position: relative;
    animation: popIn 420ms ease both;
}
.result-check::before {
    content: "";
    position: absolute;
    left: 1.15rem;
    top: 0.85rem;
    width: 0.55rem;
    height: 1.05rem;
    border-right: 3px solid var(--accent);
    border-bottom: 3px solid var(--accent);
    transform: rotate(40deg);
}
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}
.stats div {
    background: #f5faf7;
    border-radius: 14px;
    padding: 0.8rem 0.4rem;
}
.stats span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}
.stats strong { font-size: 1.05rem; }
.result-panel .btn { margin-top: 0.55rem; }

.blog-index, .blog-post { padding-top: 2.5rem; }
.post-list { display: grid; gap: 1rem; }
.post-row {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 1rem;
    padding: 1.3rem 1.4rem;
}
.post-header { margin: 1rem 0 1.8rem; }
.post-header h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0.4rem 0 0.8rem; }
.text-link { font-weight: 700; text-decoration: none; }
.prose h2, .prose h3 { font-family: var(--font-display); margin-top: 1.8rem; }
.prose p { color: var(--ink-soft); }
.prose ul { padding-left: 1.2rem; color: var(--ink-soft); }
.prose a { font-weight: 700; }
.prose code {
    background: #eef6f2;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    font-size: 0.92em;
}
.related-posts {
    margin-top: 2.8rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
}
.related-posts h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 0 0 1rem;
}
.related-list { display: grid; gap: 0.8rem; }
.related-card {
    display: grid;
    gap: 0.25rem;
    text-decoration: none;
    color: inherit;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,253,248,0.88);
}
.related-card strong { font-family: var(--font-display); }
.related-card span { color: var(--ink-soft); font-size: 0.95rem; }
.related-card:hover { border-color: rgba(15, 122, 102, 0.35); }

.site-footer {
    margin-top: 2rem;
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,0.4);
}
.footer-inner { align-items: start; padding: 2rem 0; gap: 2rem; }
.site-footer p { color: var(--ink-soft); max-width: 40ch; }
.footer-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: flex-end;
}
.footer-links { display: grid; gap: 0.45rem; justify-items: start; }
.footer-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.15rem;
}
.footer-links a { text-decoration: none; font-weight: 600; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); }
.legal-page { padding-top: 2.5rem; }
.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0 0 1.8rem;
}
.legal-nav a {
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    background: rgba(255,253,248,0.88);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
}
.legal-nav a.is-active,
.legal-nav a:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes pulseMark {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes popIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 860px) {
    .hero-grid, .tool-shell, .post-row { grid-template-columns: 1fr; }
    .hero { min-height: auto; padding-top: 2.2rem; }
    .hero-visual { min-height: 250px; order: -1; }
    .stats { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; }
    .footer-columns { justify-content: flex-start; }
    .footer-links { justify-items: start; }
    .header-inner { flex-wrap: wrap; }
    .header-actions { width: 100%; justify-content: space-between; }
    .tool-panel form > .btn-block[type="submit"],
    .tool-panel form > button.btn-block {
        margin-top: 1.75rem;
    }
}
