/*
 * style.css of https://dkim2.jp/ - Japanese version (unofficial translation) of https://dkim2.com/
 * Derived from deploy/www/style.css of https://github.com/dkim2wg/interop (last changed in commit 3a3873e04027d009361ff75e440e9445874f4d1a).
 * Changes made for dkim2.jp: (1) Japanese fonts added to the font stack, (2) body line-height 1.6 -> 1.8, (3) code may wrap anywhere,
 * (4) new rules at the end of this file for .notice, footer .sponsor and footer .license, (5) em is upright and semi-bold instead of slanted
 * (Japanese has no italic: browsers slant the glyphs artificially), (6) the language column of the implementations table does not wrap.
 * Sponsored by TwoFive.
 *
 * BSD 3-Clause License
 *
 * Copyright (c) 2026, The DKIM2 interop contributors
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *
 * 3. Neither the name of the copyright holder nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

:root {
  --fg: #1a1a1a;
  --muted: #5a5a5a;
  --accent: #1d6fb8;
  --bg: #ffffff;
  --rule: #e2e2e2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo,
    Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.8;
}

.hero, main, footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hero {
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.hero h1 {
  font-size: 3rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}

.tagline {
  font-size: 1.25rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  margin: 0;
}

a.badge {
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

a.badge:hover,
a.badge:focus {
  background: var(--accent);
  color: #fff;
}

main { padding-top: 1rem; padding-bottom: 2rem; }

section { margin: 2rem 0; }

h2 { font-size: 1.35rem; margin: 0 0 0.5rem; }

a { color: var(--accent); }

ul { padding-left: 1.2rem; }
li { margin: 0.3rem 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #f4f4f4;
  border-radius: 3px;
  padding: 0.1em 0.3em;
  overflow-wrap: anywhere;
}

pre.cname {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  background: #f4f4f4;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--rule);
}

th {
  font-weight: 600;
  border-bottom: 2px solid var(--rule);
}

td code { white-space: nowrap; }

@media (max-width: 30rem) {
  table { font-size: 0.85rem; }
  th, td { padding: 0.4rem 0.35rem; }
  td code { white-space: normal; word-break: break-all; }
}

footer {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 30rem) {
  .hero h1 { font-size: 2.25rem; }
  .tagline { font-size: 1.1rem; }
}

/* ---- added for dkim2.jp (not in the English original) ---- */

.notice {
  background: #f6f9fc;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

footer .sponsor {
  margin: 0.75rem 0 0;
  font-weight: 600;
}

footer .license {
  margin: 0.75rem 0 0;
  line-height: 1.7;
}

/* Japanese has no italic: a browser slants the glyphs artificially, which looks bad. Emphasis is shown by weight instead. */
em {
  font-style: normal;
  font-weight: 600;
}

/* ...except the short asides at the end of the three "How DKIM2 fixes it" list items, e.g. (who it was for): quiet grey, like the English italics. */
li > em:last-child {
  font-weight: normal;
  color: var(--muted);
}

/* The narrow language column of the table of other implementations must not break a word such as ホスト型 into two lines. */
#other-implementations th:nth-child(3),
#other-implementations td:nth-child(3) {
  white-space: nowrap;
}
