@media screen {
  /* The tools index starts with the résumé, then lays out the other tools. */
  .tools-page:has(> .tool-menu) > .page-intro,
  .easy-resume .er-hero,
  .ai-job-guide .article-heading {
    padding: clamp(21px, 4.2vw, 52px);
    border: 1px solid #e4dccc;
    border-radius: 28px 21px 32px 25px;
    background-color: var(--paper-base, #faf6ed);
    background-image: var(--paper-fibres, none);
    color: var(--paper-ink, #253d35);
  }

  .tools-page:has(> .tool-menu) > .page-intro h1,
  .easy-resume .er-hero h1,
  .easy-resume .er-panel-heading h2,
  .ai-job-guide .article-heading h1,
  .job-journey .jj-intro h2 {
    overflow-wrap: normal;
    word-break: normal;
    line-break: strict;
    letter-spacing: .01em;
  }

  html[lang="ja"] :is(
    .tools-page > .tool-menu h2,
    .easy-resume .er-hero h1,
    .easy-resume .er-panel-heading h2,
    .easy-resume .er-pdf-intro h2
  ) {
    word-break: auto-phrase;
  }

  html[lang="ja"] :is(
    .tools-page:has(> .tool-menu) > .page-intro h1,
    .tools-page > .tool-menu h2,
    .easy-resume .er-panel-heading h2,
    .easy-resume .er-pdf-intro h2,
    .job-journey .jj-intro h2,
    .job-journey .jj-stage-title h3,
    .job-journey .jj-list-top h3
  ) {
    font-family: var(--paper-hand, serif);
    font-weight: 600;
    letter-spacing: .015em;
  }

  .tools-page > .tool-menu {
    gap: clamp(14px, 2vw, 24px);
  }

  .tools-page > .tool-menu > a {
    display: grid;
    align-content: start;
    gap: 9px;
    min-width: 0;
    min-height: 178px;
    padding: 24px 42px 31px 24px;
    border: 1px solid #e2dccf;
    border-radius: 19px 24px 21px 27px;
    background: #fcfaf5;
    color: #283b34;
  }

  .tools-page > .tool-menu > a:nth-child(even) {
    background: #f3f6ef;
  }

  .tools-page > .tool-menu > a:first-child {
    grid-column: 1 / -1;
    min-height: 0;
    padding: clamp(23px, 3.7vw, 44px);
    padding-inline-end: clamp(56px, 8vw, 98px);
    border-color: #c7d5c5;
    border-radius: 26px 19px 30px 22px;
    background-color: #eaf0e4;
    background-image: var(--paper-fibres, none);
  }

  .tools-page > .tool-menu h2 {
    margin: 0;
    font-size: clamp(19px, 2.2vw, 25px);
    line-height: 1.48;
    overflow-wrap: normal;
    word-break: normal;
    line-break: strict;
  }

  .tools-page > .tool-menu > a:first-child h2 {
    font-size: clamp(23px, 3vw, 36px);
  }

  .tools-page > .tool-menu p {
    max-width: 56ch;
    margin: 0;
    font-size: .9375rem;
    line-height: 1.75;
    color: #465a50;
  }

  .tools-page > .tool-menu .icon {
    right: 18px;
    bottom: 17px;
    color: #385f4c;
  }

  .tools-page > .tool-menu > a:hover {
    border-color: #73917d;
    transform: none;
  }

  .tools-page > .tool-menu > a:focus-visible {
    outline: 3px solid #587e69;
    outline-offset: 3px;
  }

  .tools-page :is(.tool-panel, .tool-form, .question-list) :is(.hint, .help, .field-help) {
    font-size: .875rem;
    line-height: 1.7;
  }

  /* Warm frames for the résumé; fields and the preview keep their form styles. */
  .easy-resume {
    --er-ink: #293d36;
    --er-line: #dcded2;
    --er-soft: #f2f6ed;
    --er-muted: #4e6258;
  }

  .easy-resume .er-hero p {
    max-width: 60ch;
    font-size: 1rem;
    line-height: 1.8;
    color: #42574c;
  }

  .easy-resume .er-hero {
    display: block;
    margin-bottom: 16px;
  }

  .easy-resume .er-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(1.875rem, 4vw, 3rem);
    line-height: 1.35;
  }

  .easy-resume .er-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-block: 20px 10px;
  }

  .easy-resume .er-hero-actions .er-secondary {
    border-color: #7c9585;
    color: #315d46;
  }

  .easy-resume .er-hero .er-output-requirement {
    font-size: .875rem;
  }

  .easy-resume #er-pdf-title {
    scroll-margin-top: 22px;
  }

  .easy-resume .er-step-nav {
    margin-block: 18px 22px;
  }

  .easy-resume .er-step-nav > a {
    min-width: 0;
    border-radius: 12px 9px 13px 10px;
    color: #30473c;
  }

  .easy-resume .er-step-nav b {
    color: #315f49;
  }

  .easy-resume .er-panel {
    border-color: var(--er-line);
    border-radius: 22px 16px 25px 19px;
    padding: clamp(16px, 3vw, 34px);
  }

  .easy-resume .er-panel:target {
    border-color: #8fa596;
  }

  .easy-resume .er-panel-heading {
    padding-bottom: 17px;
    border-bottom: 1px solid #e7e8de;
  }

  .easy-resume .er-panel-heading > b {
    border-radius: 14px 12px 15px 13px;
    background: #eaf1e5;
    color: #315d46;
  }

  .easy-resume .er-panel-heading h2 {
    line-height: 1.5;
  }

  .easy-resume :is(.er-panel-heading p, .er-field > small, .er-help, .er-school-how, .er-date-tools > p, .er-pdf-actions small, .er-start-tools small, .er-storage p, .er-limit) {
    font-size: .875rem;
    line-height: 1.7;
    color: var(--er-muted);
  }

  .easy-resume :is(.er-field > span, .er-check, .er-privacy p, .er-warning-context, .er-print-preview > summary) {
    font-size: .875rem;
  }

  .easy-resume .er-review-checks .er-check {
    font-size: .875rem !important;
  }

  .easy-resume .er-pdf-import {
    border-radius: 20px 15px 23px 17px;
    background: #eff5ed;
  }

  .easy-resume .er-pdf-intro > div {
    min-width: 0;
  }

  .easy-resume .er-button {
    border-radius: var(--paper-button, 20px);
  }

  .easy-resume .er-button.er-primary:not(:disabled) {
    border-color: #315d46;
    background: #315d46;
    color: #fff;
  }

  .easy-resume .er-button.er-primary:hover:not(:disabled) {
    border-color: #244835;
    background: #244835;
  }

  .easy-resume .er-output-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
  }

  /* Keep the AI guide's instructions and its workspace visually distinct. */
  .ai-job-guide .article-heading {
    margin-inline: auto;
  }

  .ai-job-guide .article-heading .article-lead {
    max-width: 61ch;
    color: #40594c;
  }

  .ai-job-guide .ai-guide-start,
  .ai-job-guide .ai-stage-banner {
    border-color: #d3ddcc;
    border-radius: 19px 14px 21px 16px;
    background-color: #edf2e8;
    color: #2d4439;
  }

  .ai-job-guide .ai-guide-start .ai-journey-cards > a {
    border-color: #d7dfd3;
    border-radius: 15px 12px 17px 14px;
  }

  .job-journey {
    --jj-navy: #2b463a;
    border-color: #d5dece;
    border-radius: 28px 20px 31px 24px;
    background: #edf2e8;
  }

  .job-journey .jj-orbit {
    color: #597762;
  }

  .job-journey .jj-orbit b {
    border: 1px solid #cddbc8;
    border-radius: 35% 44% 36% 45%;
    background: #f8f4e8;
    color: #315d46;
  }

  .job-journey .jj-steps button {
    min-width: 0;
    min-height: 52px;
    border-color: #d1dccd;
    border-radius: 14px 11px 15px 13px;
    color: #375348;
  }

  .job-journey .jj-steps button[aria-current] {
    border-color: var(--jj-navy);
    color: #fff;
    box-shadow: 0 3px 0 #c4d2bf;
  }

  .job-journey .jj-main {
    border-color: #dce4d8;
    border-radius: 19px 14px 21px 16px;
  }

  .job-journey .jj-aside p,
  .job-journey .jj-aside li:not(.is-ready),
  .job-journey .jj-task-heading p,
  .job-journey .jj-result-meta,
  .job-journey .jj-small {
    color: #4b6156;
  }

  .job-journey .jj-list-count {
    border: 1px solid #d0ddcc;
    background: #e4ecde;
  }

  .job-journey .jj-intro > div,
  .job-journey .jj-save > span {
    min-width: 0;
  }

  /* Work guides use the same paper and keep each route step legible. */
  :is(.wd-detail, .wd-experience) {
    background-color: var(--paper-base, #faf6ed);
    background-image: var(--paper-fibres, none);
  }

  .wd-detail .wd-route-steps {
    gap: 7px;
    padding: 6px;
    border: 1px solid #d0dacb;
    border-radius: 16px 12px 18px 14px;
    background: #eaf0e5;
  }

  .wd-detail .wd-route-steps > * {
    min-width: 0;
    border: 0;
    border-radius: 12px 9px 13px 10px;
  }

  .wd-detail .wd-route-steps > span {
    background: #dce7d8;
    color: #2b4738;
  }

  .wd-detail .wd-route-steps > a:hover {
    background: #f8faf5;
    text-decoration: underline;
    text-underline-offset: .2em;
  }

  .wd-experience .wd-experience-job {
    padding: 7px;
    background: #eef2e8;
  }

  .wd-experience .wd-experience-job > img {
    border-radius: var(--paper-photo, 20px);
  }
}

@media screen and (min-width: 681px) and (max-width: 920px) {
  .tools-page > .tool-menu,
  .easy-resume .er-output-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 680px) {
  .tools-page > .tool-menu > a {
    min-height: 0;
    padding: 19px 43px 19px 20px;
  }

  .easy-resume .er-step-nav {
    border-color: #d0dacd;
    border-radius: 15px 12px 16px 13px;
    background: #f8faf6;
  }

  .easy-resume .er-step-nav > a {
    padding-inline: 2px;
    font-size: .6875rem;
    line-height: 1.4;
  }

  .easy-resume .er-hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .easy-resume #er-pdf-title {
    scroll-margin-top: 92px;
  }

  .easy-resume .er-output-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .easy-resume .er-output-actions > :is([data-er-action="pdf"], [data-er-action="print"]) {
    grid-column: 1 / -1;
  }

  .tools-page :is(.tool-panel, .tool-form, .question-list) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select) {
    font-size: 1rem;
  }

  .job-journey .jj-steps,
  .wd-detail .wd-route-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-journey .jj-steps button,
  .wd-detail .wd-route-steps > * {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    min-height: 52px;
    padding: 8px;
    font-size: 12px;
  }

  .job-journey .jj-steps button strong {
    font-size: 12px;
    line-height: 1.55;
  }

  .job-journey :is(.jj-field, .jj-prompt-preview) :is(textarea, input) {
    font-size: 16px;
  }

  .wd-detail .wd-route-steps b {
    flex: none;
    margin: 0;
  }
}

.link-materials-page {
  max-width: 960px;
}
.link-materials-page section {
  margin-block-start: 2.5rem;
}
.link-materials-page .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
  gap: 1rem;
}
.link-materials-page .stack {
  display: grid;
  gap: 1rem;
}
.link-materials-page .card {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: .75rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid #d7dcd3;
  border-radius: .75rem;
  background: #fffefa;
  color: #202a29;
}
.link-materials-page .card h3 {
  margin: 0;
}
.link-materials-page img {
  display: block;
  max-width: 100%;
  height: auto;
}
.link-materials-page textarea {
  width: 100%;
  min-height: 6.5rem;
  padding: .625rem;
  border: 1px solid #bdc8be;
  border-radius: .375rem;
  background: #fafbf8;
  color: #202a29;
  font: inherit;
  resize: vertical;
}
.link-materials-page textarea.code {
  font-family: ui-monospace, monospace;
}
.link-materials-page [role="status"] {
  min-height: 1.5em;
}
