/* Global styles */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root {
    --bg: #09090c;
    --card: #151219;
    --card2: #1c1720;
    --line: #342634;
    --text: #f8f3f7;
    --muted: #a99baa;
    --pink: #ff5ca9;
    --light: #ffb3d6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(ellipse at 80% -10%,#281020 0,transparent 40%),var(--bg);
    color: var(--text);
    font: 15px/1.65 "DM Sans",sans-serif;
}

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

.shell {
    max-width: 1050px;
    margin: auto;
    padding: 32px 22px 65px;
}

.top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
    margin-bottom: 42px;
}

.brand {
    font: 800 23px Manrope,sans-serif;
    letter-spacing: -.8px;
}

.brand b {
    color: var(--pink);
}

.back {
    color: var(--muted);
    font-size: 13px;
}

.back:hover {
    color: var(--pink);
}

.eyebrow {
    color: var(--pink);
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 35px;
    margin-bottom: 38px;
}

.hero h1 {
    font: 800 clamp(30px,5vw,52px)/1.18 Manrope,sans-serif;
    letter-spacing: -1.6px;
    margin: 10px 0 14px;
}

.hero p {
    color: var(--muted);
    max-width: 620px;
}

.portrait {
    width: 132px;
    height: 155px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--line);
}

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

.tile,
.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 25px;
}

.tile {
    display: block;
    transition: .2s;
}

.tile:hover {
    border-color: #a44776;
    transform: translateY(-2px);
}

.tile .num {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--pink);
    font-weight: 700;
}

.tile h2 {
    font: 700 21px Manrope;
    margin: 14px 0 5px;
}

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

.arrow {
    color: var(--pink);
    margin-top: 18px;
    display: block;
}

.panel {
    max-width: 720px;
}

.panel h1 {
    font: 800 clamp(25px,4vw,38px) Manrope;
    margin: 4px 0 6px;
}

.sub {
    color: var(--muted);
    margin: 0 0 24px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
}

.value {
    font: 800 56px Manrope;
    color: var(--pink);
    margin: 12px 0;
}

.btn {
    background: var(--pink);
    color: #170c13;
    border: 0;
    border-radius: 9px;
    padding: 11px 17px;
    font: 700 14px "DM Sans";
    cursor: pointer;
}

.btn:hover {
    background: var(--light);
}

.btn.secondary {
    background: #29212b;
    color: var(--text);
    border: 1px solid var(--line);
}

input[type=text] {
    width: min(100%,340px);
    background: #0e0b10;
    color: var(--text);
    border: 1px solid #534053;
    border-radius: 9px;
    padding: 12px;
    font: inherit;
}

input:focus {
    outline: 2px solid #ff5ca966;
}

label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin: 14px 0 6px;
}

.result {
    padding: 16px;
    background: #201620;
    border-left: 3px solid var(--pink);
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
    min-height: 55px;
    overflow-wrap: anywhere;
}

.swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.swatch {
    width: 38px;
    height: 38px;
    border: 2px solid #fff5;
    border-radius: 10px;
    cursor: pointer;
}

.sample {
    font: 700 25px Manrope;
    margin: 24px 0;
}

.foot {
    border-top: 1px solid var(--line);
    margin-top: 60px;
    padding-top: 18px;
    color: var(--muted);
    font-size: 12px;
}

.muted {
    color: var(--muted);
}

.tag {
    display: inline-block;
    border: 1px solid #5c3550;
    color: var(--light);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
}

.links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.links a {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 12px;
    color: var(--muted);
    font-size: 13px;
}

.links a:hover {
    color: var(--pink);
}

@media (max-width:680px) {
        .shell {
        padding: 22px 16px 45px;
    }

        .grid {
        grid-template-columns: 1fr;
    }

        .hero {
        align-items: flex-start;
    }

        .portrait {
        width: 85px;
        height: 105px;
    }

        .tile,
    .panel {
        padding: 19px;
    }

        .top {
        margin-bottom: 27px;
    }

        .brand {
        font-size: 19px;
    }
}

html {
    background: var(--bg);
}

body {
    min-height: 100vh;
    background: radial-gradient(ellipse at 80% 0%,#281020 0,transparent 42%),var(--bg);
    background-repeat: no-repeat;
}

.shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 35px;
}

.foot {
    margin-top: auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0,1fr) 250px;
    gap: 45px;
}

.portrait {
    width: 230px;
    height: 285px;
    justify-self: end;
}

.isd-table {
    overflow-x: auto;
    margin: 15px 0 25px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.isd-table table {
    border-collapse: collapse;
    min-width: 610px;
    width: 100%;
    background: var(--card);
    font-size: 13px;
}

.isd-table th,
.isd-table td {
    padding: 13px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

.isd-table th {
    background: var(--card2);
    color: var(--light);
}

.isd-table tr:last-child td {
    border-bottom: 0;
}

.isd-diagram {
    background: #f8f7fa;
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}

.isd-diagram img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: auto;
}

.tile .num {
    display: block;
}

.tile h2 {
    overflow-wrap: anywhere;
}

.isd-breadcrumb {
    color: var(--muted);
    font-size: 13px;
    margin: -20px 0 20px;
}

.isd-breadcrumb a {
    color: var(--pink);
}

@media (max-width:680px) {
        .hero {
        grid-template-columns: 1fr;
    }

        .portrait {
        width: 180px;
        height: 225px;
        justify-self: start;
        grid-row: 1;
    }

        .isd-table table {
        min-width: 540px;
    }

        .isd-navigation {
        font-size: 12px;
    }

        .shell {
        padding-bottom: 28px;
    }
}

.isd-shell {
    max-width: 1020px;
}

.isd-top {
    margin-bottom: 30px;
}

.isd-directory-header {
    max-width: 900px;
    padding: 10px 0 25px;
}

.isd-directory-header h1 {
    font: 800 clamp(32px,5vw,49px)/1.14 Manrope,sans-serif;
    letter-spacing: -1.5px;
    margin: 8px 0 15px;
}

.isd-directory-header h1 span {
    color: var(--pink);
}

.isd-topic {
    font: 600 clamp(17px,2.4vw,23px)/1.55 Manrope,sans-serif;
    max-width: 850px;
    color: var(--text);
    margin: 0 0 12px;
}

.isd-context {
    color: var(--muted);
    margin: 0;
    max-width: 770px;
}

.isd-chapter-list {
    border-top: 1px solid var(--line);
    margin: 15px 0 28px;
}

.isd-chapter-link {
    display: grid;
    grid-template-columns: 48px minmax(150px,1fr) minmax(190px,1.3fr) 20px;
    gap: 15px;
    align-items: center;
    padding: 15px 9px;
    border-bottom: 1px solid var(--line);
    transition: background .15s;
}

.isd-chapter-link:hover {
    background: #ff5ca90b;
    text-decoration: none;
}

.isd-chapter-link .n {
    font-size: 12px;
    color: var(--pink);
    letter-spacing: 1px;
    font-weight: 700;
}

.isd-chapter-link strong {
    font: 700 16px Manrope,sans-serif;
    color: var(--text);
}

.isd-chapter-link .desc {
    font-size: 13px;
    color: var(--muted);
}

.isd-chapter-link .go {
    color: var(--pink);
    text-align: right;
    font-size: 20px;
}

.isd-doc-header {
    border-bottom: 1px solid var(--line);
    padding-bottom: 24px;
    margin-bottom: 22px;
}

.isd-doc-header h1 {
    font: 800 clamp(30px,5vw,45px)/1.15 Manrope,sans-serif;
    letter-spacing: -1.1px;
    margin: 11px 0;
}

.isd-breadcrumb {
    font-size: 13px;
    color: var(--muted);
}

.isd-breadcrumb a {
    color: var(--light);
}

.isd-doc-sub {
    font-size: 15px;
    color: var(--muted);
    max-width: 850px;
}

.isd-document {
    max-width: 930px;
}

.doc-section {
    margin: 0 0 27px;
}

.doc-section h2 {
    font: 700 19px Manrope,sans-serif;
    margin: 0 0 12px;
    padding-left: 12px;
    border-left: 3px solid var(--pink);
}

.doc-section p,
.doc-section li {
    color: #ded5de;
}

.doc-section p {
    margin: 10px 0 14px;
}

.doc-section li {
    margin: 8px 0;
}

.isd-table {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow-x: auto;
    background: var(--card);
    margin: 12px 0 20px;
}

.isd-table table {
    border-collapse: collapse;
    width: 100%;
    min-width: 580px;
    text-align: left;
    font-size: 13px;
}

.isd-table th {
    font-weight: 700;
    color: var(--light);
    background: var(--card2);
}

.isd-table th,
.isd-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.isd-table tr:last-child td {
    border-bottom: 0;
}

.isd-navigation {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    margin: 35px 0 25px;
    padding-top: 20px;
}

.isd-navigation a,
.task-navigation a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    color: var(--light);
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.isd-navigation a:hover,
.task-navigation a:hover {
    border-color: var(--pink);
    background: var(--card2);
    color: var(--pink);
    transform: translateY(-1px);
}

.isd-navigation a:focus-visible,
.task-navigation a:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 3px;
}

.task-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.task-navigation .previous,
.task-navigation .nav-placeholder {
    justify-self: start;
}

.task-navigation .all-projects {
    justify-self: center;
}

.task-navigation .next {
    justify-self: end;
}

.task-navigation .nav-placeholder {
    visibility: hidden;
}

.isd-home-btn {
    display: inline-block;
    color: var(--light);
    font-size: 13px;
    margin-top: 10px;
}

@media (max-width:680px) {
        .isd-chapter-link {
        grid-template-columns: 32px 1fr 20px;
        gap: 9px;
        padding: 14px 5px;
    }

        .isd-chapter-link .desc {
        grid-column: 2;
        grid-row: 2;
    }

        .isd-chapter-link .go {
        grid-column: 3;
        grid-row: 1/3;
    }

        .isd-document {
        width: 100%;
    }

        .isd-table th,
    .isd-table td {
        padding: 11px;
    }

        .isd-navigation {
        gap: 10px;
    }
}

.isd-document .doc-section {
    margin: 0 0 27px;
}

.isd-document .doc-section>h2 {
    font-size: 19px;
    line-height: 1.5;
    margin: 0 0 13px;
}

.isd-document p {
    line-height: 1.8;
    color: #d6cbd6;
}

.isd-document li {
    margin-bottom: 7px;
    line-height: 1.65;
}

.isd-document .isd-table {
    margin-top: 14px;
    margin-bottom: 10px;
}

.isd-diagram {
    margin: 20px 0 25px;
    padding: 15px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.isd-diagram img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: auto;
}

.isd-diagram figcaption {
    color: var(--muted);
    font-size: 12px;
    margin-top: 12px;
    text-align: center;
}

.isd-document th {
    white-space: normal;
}

.isd-document td {
    vertical-align: top;
}

.isd-document section+section {
    padding-top: 9px;
}


/* WEB-T/3 — polished preset color controls */
.swatches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0 26px;
}
.swatch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 3px solid var(--surface, #f8f8f3);
  border-radius: 50%;
  background: var(--swatch-color);
  box-shadow: 0 0 0 1px var(--line, #d9ded6), 0 5px 14px rgba(25, 35, 31, .13);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, outline-color .18s ease;
}
.swatch:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 0 0 1px var(--line, #d9ded6), 0 10px 19px rgba(25, 35, 31, .17);
}
.swatch[aria-pressed="true"] {
  outline: 2px solid var(--accent, #bd6248);
  outline-offset: 3px;
  transform: translateY(-2px);
}
.swatch[aria-pressed="true"]::after {
  content: "✓";
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(25, 35, 31, .72);
  color: #fff;
  font: 700 13px/1 "DM Sans", sans-serif;
  text-shadow: none;
}
.swatch:focus-visible {
  outline: 3px solid var(--ink, #202a27);
  outline-offset: 5px;
}
.custom-color {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.custom-color label {
  margin: 0;
}
.color-picker {
  appearance: none;
  -webkit-appearance: none;
  width: 54px;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--line, #d9ded6);
  border-radius: 11px;
  background: var(--surface, #f8f8f3);
  box-shadow: 0 3px 9px rgba(25, 35, 31, .07);
  cursor: pointer;
}
.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}
.color-picker::-moz-color-swatch {
  border: 0;
  border-radius: 7px;
}
@media (max-width: 520px) {
  .swatches { gap: 14px; }
  .swatch { flex-basis: 44px; width: 44px; height: 44px; }
}
